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

[0D-Tensor] CINN supports fill_constant, fix infershape and pass #55563

Merged

Conversation

jiahy0825
Copy link
Contributor

PR types

Function optimization

PR changes

OPs

Description

Pcard-71127

[0D-Tensor] CINN supports fill_constant, fix infershape and pass

@paddle-bot
Copy link

paddle-bot bot commented Jul 19, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Comment on lines +110 to +111
Instruction HandleFillConstant(const Instruction& instr) {
Instruction new_instr = instr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么转成了1D?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 pass 会把对 0D-Tensor 的处理转为 1D-Tensor,从而适配后端生成逻辑

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那就是后端的代码生成还不支持fill_constant的0D-Tensor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的

@jiahy0825 jiahy0825 merged commit f5830c0 into PaddlePaddle:develop Jul 26, 2023
27 checks passed
wz1qqx pushed a commit to wz1qqx/Paddle that referenced this pull request Jul 31, 2023
…addlePaddle#55563)

* [0D-Tensor] CINN supports fill_constant, fix infershape and pass

* fix infershape of fill_constant

* add back fill_constant to zero_tensor_trick_pass
jinjidejinmuyan pushed a commit to jinjidejinmuyan/Paddle that referenced this pull request Aug 30, 2023
…addlePaddle#55563)

* [0D-Tensor] CINN supports fill_constant, fix infershape and pass

* fix infershape of fill_constant

* add back fill_constant to zero_tensor_trick_pass
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.

None yet

2 participants