-
Notifications
You must be signed in to change notification settings - Fork 24.2k
xpu: get xpu arch flags at runtime in cpp_extensions #152192
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152192
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 96f1e66 with merge base 9608e7f ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
@pytorchbot label "module: xpu" |
@pytorchbot label "ciflow/xpu" |
To add these label(s) (ciflow/xpu) to the PR, please first approve the workflows that are awaiting approval (scroll to the bottom of this page). 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. |
In the last push to PR - fix of linter issue, no other changes. |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
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.
Sure
@@ -291,16 +291,25 @@ def _get_sycl_arch_list(): | |||
# If arch list returned by _get_sycl_arch_list() is empty, then sycl kernels will be compiled | |||
# for default spir64 target and avoid device specific compilations entirely. Further, kernels | |||
# will be JIT compiled at runtime. | |||
def _get_sycl_target_flags(): | |||
if _get_sycl_arch_list() != '': |
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.
Why do you build the full arch list just to check if it's empty?
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.
User can either specify the empty arch list externally (via TORCH_XPU_ARCH_LIST
building his extension) or default arch list can be empty if that's how user's pytorch version was originally built (with empty TORCH_XPU_ARCH_LIST
when building pytorch). Further, empty arch list is still a valid case since it corresponds to JIT runtime compilation. This if handles options difference between JIT and AOT cases.
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
This commit moves query for xpu arch flags to runtime when building SYCL extensions which allows to adjust `TORCH_XPU_ARCH_LIST` at python script level. That's handy for example in ci test which gives a try few variants of the list. Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Successfully rebased |
@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 |
This commit moves query for xpu arch flags to runtime when building SYCL extensions which allows to adjust
TORCH_XPU_ARCH_LIST
at python script level. That's handy for example in ci test which gives a try few variants of the list.CC: @malfet, @jingxu10, @EikanWang, @guangyey
cc @gujinghui @EikanWang @fengyuan14 @guangyey