-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[AOTI][Intel GPU] Support multi_arch_kernel_binary option for XPU. #154514
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
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/154514
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ You can merge normally! (2 Unrelated Failures)As of commit ef39ce7 with merge base 6cb6da6 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi, @desertfire @eellison Would you mind taking a look at this PR when you have time? We need it to address the XPU CI failures. Thank you very much! |
desertfire
left a comment
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.
I also did some config renaming in #154608. You will need to rebase after that.
| binary = launcher.bin.asm[bin_type] | ||
| # Also store asm code which can be used for debugging and generating cpp package | ||
| asm_type = {"hip": "amdgcn", "cuda": "ptx"}.get(self.device_props.type, None) | ||
| asm_type = {"hip": "amdgcn", "cuda": "ptx", "xpu": "spv"}.get( |
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.
Since we already generate spv for xpu, shouldn't the added new option be a no-op for xpu?
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.
Hi @desertfire , Yes, in theory XPU doesn’t need this option. I added it to align with the user interface, and also to fix some errors that occur on XPU when this option is specified in UT. For example: https://hud.pytorch.org/pr/pytorch/pytorch/147693#43085076369
RuntimeError: Failed to run autotuning code block: Missing kernel assembly code
And this may also helps avoid adding multiple if-else checks in the code specifically for XPU.
| if hash_type in {"amdgcn", "code", "ptx"}: | ||
| if hash_type in {"amdgcn", "code", "ptx", "spv"}: | ||
| return code_hash(content, extra) | ||
| if hash_type in {"cubin", "hsaco", "spv"}: |
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.
It probably doesn't matter in terms of functionality, but "spv" will not hit this branch anymore.
…for XPU." Following the design of #154413, this PR add XPU support for generating kernel binary files that support multiple archs. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
…for XPU." Following the design of #154413, this PR add XPU support for generating kernel binary files that support multiple archs. Fixes #154682, Fixes #154683, Fixes 154689, Fixes #154685 , Fixes #154690, Fixes #154681 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
|
@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 |
…ytorch#154514) Following the design of pytorch#154413, this PR add XPU support for generating kernel binary files that support multiple archs. Fixes pytorch#154682, Fixes pytorch#154683, Fixes 154689, Fixes pytorch#154685 , Fixes pytorch#154690, Fixes pytorch#154681 Pull Request resolved: pytorch#154514 Approved by: https://github.com/desertfire, https://github.com/EikanWang
…ytorch#154514) Following the design of pytorch#154413, this PR add XPU support for generating kernel binary files that support multiple archs. Fixes pytorch#154682, Fixes pytorch#154683, Fixes 154689, Fixes pytorch#154685 , Fixes pytorch#154690, Fixes pytorch#154681 Pull Request resolved: pytorch#154514 Approved by: https://github.com/desertfire, https://github.com/EikanWang
Stack from ghstack (oldest at bottom):
Following the design of #154413, this PR add XPU support for generating kernel binary files that support multiple archs.
Fixes #154682, Fixes #154683, Fixes 154689, Fixes #154685 , Fixes #154690, Fixes #154681
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov