-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Dy2St] Support pass cuda graph state and dispatch key in run program op and move get value name to python side #73417
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
…spatch-key-in-run-program-op
There was a problem hiding this 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 introduces new support for passing cuda graph state and dispatch key parameters to the run program op. Key changes include:
- Adding a new IntEnum (CUDAGraphState) to represent the different cuda graph states.
- Updating attribute preparation and caching logic to include cuda graph state and dispatch key.
- Propagating the new parameters in various op function bindings and interpreter interfaces.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
python/paddle/jit/dy2static/utils.py | Added CUDAGraphState IntEnum for cuda graph states. |
python/paddle/jit/dy2static/pir_partial_program.py | Refactored attribute preparation and run implementation to include cuda graph state and dispatch key. |
paddle/fluid/pybind/pir.cc | Bound a new helper to retrieve fake value names. |
paddle/fluid/pybind/op_function_common.cc | Added new attribute definitions for cuda graph state and dispatch key. |
paddle/fluid/framework/{new_executor/,executor_cache.} | Updated interpreter and caching logic to handle new cuda graph parameters. |
paddle/fluid/eager/to_static/{run_program_op_node.h,run_program_op_func.h} | Integrated cuda graph state support through new attribute extraction and usage. |
Comments suppressed due to low confidence (1)
paddle/fluid/pybind/op_function_common.cc:1257
- [nitpick] Consider adding inline comments for the new 'cuda_graph_state' and 'cuda_graph_dispatch_key' attributes to document their expected values in accordance with the CUDAGraphState enum, which will help future maintainability.
{"cuda_graph_state", CastPyArg2AttrLong},
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…spatch-key-in-run-program-op
…spatch-key-in-run-program-op
skip-reason: 执行器已经 review 过,后续更新无相关变动 |
PR Category
Execute Infrastructure
PR Types
New features
Description
动转静 run program op 支持传递
cuda_graph_state
和cuda_graph_dispatch_key
,以确保CudaGraphInstruction
能够感知cuda_graph_state
的变化本 PR 会和 #73393 联调
另外降低 value 获取 name 开销,将所有 name 获取统一移到 python 端,移除 value 传递到 cpp 端的操作(目前
fx
还没有删掉)