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

[PIR] fix translation for fake quantize ops #65717

Conversation

kangguangli
Copy link
Contributor

@kangguangli kangguangli commented Jul 4, 2024

PR Category

Inference

PR Types

Bug fixes

Description

fix translation for fake quantize ops

Others

Pcard-71500

Copy link

paddle-bot bot commented Jul 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.

@@ -1956,12 +1956,14 @@ static std::pair<std::string, std::string> GenerateForwardFunctionContents(
} else {
const char* FWD_OUT_TENSOR_TEMPLATE =
" egr::EagerUtils::GetOutput(outs[\"%s\"][0], %s);\n"
" paddle::Tensor& %s = *%s;\n";
" paddle::Tensor& %s = *%s;\n"
" (void)%s; // To avoid error: unused variable\n";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

在输出被inplace的情形下,如果该输出在反向过程中未被使用,那么自动生成的代码就会报 error: unused variable

@kangguangli kangguangli merged commit 170a1c7 into PaddlePaddle:develop Jul 5, 2024
31 of 32 checks passed
@kangguangli kangguangli deleted the fix_translation_for_fake_quantize_ops branch July 5, 2024 03:12
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