Skip to content

Modify the DataType directly when the Operand of whileOp is FakeFull. #69939

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

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

zhanghonggeng
Copy link
Contributor

PR Category

Performance Optimization

PR Types

Performance

Description

while op会创建一个fake的full op,如下所示:
(%2678) = "pd_op.full" [id:743] () {dtype:(pd_op.DataType)float16,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:(pd_op.IntArray)[],stop_gradient:[false],sym_shape_str:"shape[], data[0]",value:(Float)0} : () -> builtin.tensor<-1x501x4xf16>
其中属性shape和输出tensor的dims信息对不上。while op不支持低精度计算,AMP会将fakle full op后插入cast将其从fp16转为fp32,而CINN会将full和cast OP组成cinn_op.group。由于CINN不支持fake full op的处理,因此不期望在fake op后插cast,而是直接修改full op的数据类型。
Pcard-67164

Copy link

paddle-bot bot commented Dec 4, 2024

你的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.

@zyfncg zyfncg merged commit fe607df into PaddlePaddle:develop Dec 10, 2024
28 checks passed
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