Skip to content

Conversation

@SigureMo
Copy link
Member

PR Category

Execute Infrastructure

PR Types

Performance

Description

删掉 run_program_op 外的 runtime_guards,目前 runtime_guards 约占用了 50us

@SigureMo SigureMo requested a review from Copilot April 27, 2025 13:35
@paddle-bot
Copy link

paddle-bot bot commented Apr 27, 2025

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the runtime guards associated with the run_program_op in order to reduce the runtime overhead by approximately 50µs.

  • Removed the add_auto_layout_guard and runtime_guards methods from python/paddle/jit/dy2static/utils.py.
  • Updated python/paddle/jit/dy2static/pir_partial_program.py to eliminate the use of runtime_guards around _C_ops.run_program calls.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
python/paddle/jit/dy2static/utils.py Removed unused runtime_guards and related guard helper methods.
python/paddle/jit/dy2static/pir_partial_program.py Removed the with runtime_guards(context) blocks before _C_ops.run_program calls.
@SigureMo SigureMo changed the title [Dy2St][CINN] Remove runtime_guards for run_program_op [Dy2St][CINN] Remove runtime_guards around run_program_op call Apr 27, 2025
@SigureMo SigureMo merged commit d800878 into PaddlePaddle:develop Apr 28, 2025
42 checks passed
@SigureMo SigureMo deleted the dy2st/remove-runtime-guards branch April 28, 2025 00:22
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (develop@c305e9b). Learn more about missing BASE report.

Additional details and impacted files
@@ Coverage Diff @@ ## develop #72521 +/- ## =========================================== Coverage ? 100.00% =========================================== Files ? 1 Lines ? 2 Branches ? 0 =========================================== Hits ? 2 Misses ? 0 Partials ? 0 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants