forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inductor: fix cpp wrapper ExternKernel check (pytorch#96799)
Fix cpp_wrapper functionality for ExternKernel. Changes in pytorch#91575 has disabled the cpp_wrapper for ExternKernel cases. 1. Need to set the `cpp_wrapper` attr before `V.graph.register_buffer(self)`. `register_buffer` will invoke the below check: https://github.com/pytorch/pytorch/blob/c6a82e433924b4d36fd571d36ce363cb1c622c76/torch/_inductor/graph.py#L220-L223 The current code which sets the `cpp_wrapper` after the `V.graph.register_buffer(self)` will always disable the cpp wrapper. 2. Fix the missing `ordered_kwargs_for_cpp_kernel` attr for `at::addmm_out` 3. Enhance the UT to check that cpp_wrapper has been turned on for the supported cases to prevent being unintentionally disabled by future changes. Pull Request resolved: pytorch#96799 Approved by: https://github.com/jgong5, https://github.com/EikanWang, https://github.com/jansel
- Loading branch information
1 parent
13538c8
commit 238b060
Showing
4 changed files
with
37 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters