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

cache scope in while #52628

Merged
merged 3 commits into from
Apr 12, 2023
Merged

Conversation

zhupengyang
Copy link
Contributor

@zhupengyang zhupengyang commented Apr 7, 2023

PR types

Performance optimization

PR changes

Others

Describe

  • 推理过程中每次创建新的 scope,带来额外的耗时。尝试复用同一个 scope 进行加速。
    • 设置 FLAGS_cache_inference_while_scope=1 时生效(默认为0,即不复用scope)
  • 复用scope可能导致分布式推理出现问题。参考 Cache scope in While Op during Inference. #49083
  • 复用scope会导致 test_fast_rcnn_mkldnn.py 稳定挂

@paddle-bot
Copy link

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

@zhupengyang zhupengyang changed the title while reset_scope reuse scope in while Apr 7, 2023
@zhupengyang zhupengyang force-pushed the new_executor branch 2 times, most recently from f811727 to 0bf9701 Compare April 11, 2023 11:57
@zhupengyang zhupengyang changed the title reuse scope in while cache scope in while Apr 12, 2023
Copy link
Contributor

@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
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM for flags

@zhupengyang zhupengyang merged commit 8e7c378 into PaddlePaddle:develop Apr 12, 2023
@zhupengyang zhupengyang deleted the new_executor branch April 12, 2023 08:26
GGBond8488 pushed a commit to GGBond8488/Paddle that referenced this pull request May 5, 2023
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