[inductor] Remove usage of device_interface from _inductor.runtime#124592
[inductor] Remove usage of device_interface from _inductor.runtime#124592jansel wants to merge 5 commits intogh/jansel/328/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/124592
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7e4766c with merge base 26f8d96 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| # Disable for Intel GPU as Triton is not ready to return n_regs for a compiled_binary. | ||
| and self.device_type != "xpu" | ||
| # Disable for AMDGPU/Intel as Triton is not ready to return n_regs for a compiled_binary. | ||
| and device_prop.type == "cuda" |
There was a problem hiding this comment.
Just checking this is what you want. Instead of != xpu and != hip, you're doing == cuda. I assume that's fine?
There was a problem hiding this comment.
Yes, these are the only 3 supported values and if we add new ones we likely want to skip this.
|
|
||
| def _precompile_config(self, cfg: Config, warm_cache_only_with_cc: Optional[int]): | ||
| def get_device_interface(self): | ||
| # this code cannot run in compile workers, because it imports from torch |
There was a problem hiding this comment.
I wonder if there's a way we could assert that?
There was a problem hiding this comment.
There are asserts in the verify() function in the followup PR.
| cc = self.device_interface.get_compute_capability(device) | ||
|
|
||
| compile_meta["cc"] = cc | ||
| # device type will be "hip" rather than "cuda" here |
There was a problem hiding this comment.
nit: Not sure I understand this comment. Seems like it could be hip here.
|
@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 |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
) Pull Request resolved: #124681 Approved by: https://github.com/masnesral ghstack dependencies: #124592
|
@pytorchbot revert -m "breaking internal tests, check D56522594" -c nosignal |
|
@pytorchbot successfully started a revert job. Check the current status here. |
Reverting PR 124592 failedReason: Command Details for Dev Infra teamRaised by workflow job |
|
@masnesral has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
) Differential Revision: [D56723769](https://our.internmc.facebook.com/intern/diff/D56723769) Co-authored-by: Sam Larsen <slarsen@meta.com> Pull Request resolved: #124681 Approved by: https://github.com/masnesral ghstack dependencies: #124592
…124592) Pull Request resolved: #124592 Approved by: https://github.com/masnesral
) Pull Request resolved: #124681 Approved by: https://github.com/masnesral ghstack dependencies: #124592
This reverts commit 9888d74. Reverted pytorch#121801 on behalf of https://github.com/jeanschmidt due to need to revert so I can revert pytorch#124592 ([comment](pytorch#121801 (comment)))
This reverts commit c55309e. Reverted pytorch#124775 on behalf of https://github.com/jeanschmidt due to need to revert so I can revert pytorch#124592 ([comment](pytorch#124775 (comment)))
…ntime (pytorch#124592)" This reverts commit 5d45eb7. Reverted pytorch#124592 on behalf of https://github.com/jeanschmidt due to breaking internal tests, check D56522594 ([comment](pytorch#124592 (comment)))
…ytorch#124592) Differential Revision: [D56723770](https://our.internmc.facebook.com/intern/diff/D56723770) Co-authored-by: Sam Larsen <slarsen@meta.com> Pull Request resolved: pytorch#124592 Approved by: https://github.com/masnesral
…rch#124681) Differential Revision: [D56723769](https://our.internmc.facebook.com/intern/diff/D56723769) Co-authored-by: Sam Larsen <slarsen@meta.com> Pull Request resolved: pytorch#124681 Approved by: https://github.com/masnesral ghstack dependencies: pytorch#124592
Small bug fix - #124592 replaced the torch.version.hip with device_props but made a mistake in porting the original logic. The original code was: ``` if torch.version.hip is not None: ``` Which was incorrectly replaced by: ``` if self.device_props.type != "hip": ``` Perhaps we need to write some unit tests here in the future. Pull Request resolved: #130617 Approved by: https://github.com/masnesral
…0617) Small bug fix - pytorch#124592 replaced the torch.version.hip with device_props but made a mistake in porting the original logic. The original code was: ``` if torch.version.hip is not None: ``` Which was incorrectly replaced by: ``` if self.device_props.type != "hip": ``` Perhaps we need to write some unit tests here in the future. Pull Request resolved: pytorch#130617 Approved by: https://github.com/masnesral
Small bug fix - #124592 replaced the torch.version.hip with device_props but made a mistake in porting the original logic. The original code was: `if torch.version.hip is not None:` Which was incorrectly replaced by: `if self.device_props.type != "hip":` Another occurence of #130617 Pull Request resolved: #133852 Approved by: https://github.com/masnesral, https://github.com/malfet
…#133852) Small bug fix - pytorch#124592 replaced the torch.version.hip with device_props but made a mistake in porting the original logic. The original code was: `if torch.version.hip is not None:` Which was incorrectly replaced by: `if self.device_props.type != "hip":` Another occurence of pytorch#130617 Pull Request resolved: pytorch#133852 Approved by: https://github.com/masnesral, https://github.com/malfet (cherry picked from commit da587de)
…#133852) Small bug fix - pytorch#124592 replaced the torch.version.hip with device_props but made a mistake in porting the original logic. The original code was: `if torch.version.hip is not None:` Which was incorrectly replaced by: `if self.device_props.type != "hip":` Another occurence of pytorch#130617 Pull Request resolved: pytorch#133852 Approved by: https://github.com/masnesral, https://github.com/malfet
#136139) Small bug fix - #124592 replaced the torch.version.hip with device_props but made a mistake in porting the original logic. The original code was: `if torch.version.hip is not None:` Which was incorrectly replaced by: `if self.device_props.type != "hip":` Another occurence of #130617 Pull Request resolved: #133852 Approved by: https://github.com/masnesral, https://github.com/malfet (cherry picked from commit da587de)
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang
Differential Revision: D56723770