Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cherry-pick)Fix split infershape in static mode and add convert rules for fill_any_like op #46079

Merged
merged 2 commits into from
Sep 16, 2022

Conversation

Charles-hit
Copy link
Contributor

@Charles-hit Charles-hit commented Sep 15, 2022

PR types

Bug fixes

PR changes

Others

Describe

本pr主要cherry-pick了两个pr。
a.(#45906)
该pr主要是对split在静态图下infershape推导行为异常进行修复。
复现代码:

import paddle
import paddle.fluid as fluid

paddle.enable_static()
data = fluid.layers.data('data', shape=[-1, 10], dtype='float64')
out = paddle.split(data, num_or_sections=2, axis=0)
print(out)

修复前错误结果:
image
修复后结果:
image
结果对比可以看出来修复后第一维的推导结果不再是-1.

b.(#45985)
该pr为科学计算fill_any_like op添加转换规则,并且添加相应单测。

* fix split bug in static mode

* modify code style

* modify code style

* add unit test for split
…e#45985)

* add convert rules for fill_any_like op in paddle science

* add unit test for fill_any_like op in paddle science

* modify fill_any_like convert rule

* modify fill_any_like convert rule dtype
@Charles-hit Charles-hit changed the title Fix split infershape in static mode and add convert rules for fill_any_like op Fix split infershape in static mode Sep 15, 2022
@Charles-hit Charles-hit changed the title Fix split infershape in static mode Fix split infershape in static mode and add convert rules for fill_any_like op Sep 15, 2022
@Charles-hit Charles-hit changed the title Fix split infershape in static mode and add convert rules for fill_any_like op (cherry-pick)Fix split infershape in static mode and add convert rules for fill_any_like op Sep 16, 2022
@phlrain phlrain merged commit 4e09e40 into PaddlePaddle:release/2.4 Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants