Refactor cpp codegen to support overridable class attributes.#155553
Refactor cpp codegen to support overridable class attributes.#155553vpandya-quic wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155553
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e522b1c with merge base f810e98 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
|
@leslie-fang-intel could you please review? |
leslie-fang-intel
left a comment
There was a problem hiding this comment.
Thanks for the PR! Could you add a summary in the description explaining the motivation behind this change?
2158107 to
0d9bf40
Compare
Updated the PR with couple of more changes and description to explain motivation behind this change. This change will allow me to achieve my goal without copy pasting whole function just to change certain class. |
|
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
0d9bf40 to
a1bb370
Compare
|
I have tried to fix linter issues. The other two CI failure seems unrelated to this change. |
There was a problem hiding this comment.
Please add comments on these fields explaining why we need them and how they can be used for customization.
There was a problem hiding this comment.
Added comments.
- Refactored CppKernelProxy and CppScheduling to use class-level attributes (kernel_cls, kernel_proxy_cls) for backend-specific kernel customization. - Avoids method duplication (e.g., codegen_functions, codegen_node) for backend-specific overrides thus reduces downstream maintenance when upgrading Torch. - Ensures type safety with annotations while keeping core logic centralized and extensible.
a1bb370 to
e522b1c
Compare
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov