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

set RuntimeProgram for sub_block when use Cxx Config #5776

Merged
merged 4 commits into from
Mar 30, 2021

Conversation

zhupengyang
Copy link
Collaborator

@zhupengyang zhupengyang commented Mar 23, 2021

  • 问题:x86+xpu运行带控制流的模型时(使用CxxConfig),仅main block中的kernel可以使用xpu kernel,sub_block的kernel都只能跑在CPU上。

  • 原因:仅main block中生成了正确的RuntimeProgram;sub_block的RuntimeProgram在运行时才生成。

  • 方案:GenerateProgramPass中对sub_block的RuntimeProgram进行生成和设置。

@paddle-bot-old
Copy link

Thanks for your contribution!

@zhupengyang zhupengyang changed the title program_desc set RuntimeProgram for sub_block when use Cxx Config Mar 24, 2021
hong19860320
hong19860320 previously approved these changes Mar 24, 2021
Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhupengyang zhupengyang merged commit e348a8a into PaddlePaddle:develop Mar 30, 2021
@zhupengyang zhupengyang deleted the program_desc branch March 30, 2021 11:36
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.

2 participants