8000 xpu: torch.xpu.get_arch_list() to return [] if xpu not compiled by dvrogozh · Pull Request #147431 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

xpu: torch.xpu.get_arch_list() to return [] if xpu not compiled #147431

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

Closed
wants to merge 1 commit into from

Conversation

dvrogozh
Copy link
Contributor

Initially discussed here: #132945 (comment)

Previously torch.xpu.get_arch_list() got relaxed to work even if XPU device is not available. However, we overlooked the case when pytorch is not compiled with XPU support. In such a case function throws an exception. This commit adjusts this behavior and makes function return [] even if pytorch is not compiled with XPU support.

CC: @EikanWang @fengyuan14 @guangyey @malfet @albanD

Initially discussed here: pytorch#132945 (comment)

Previously `torch.xpu.get_arch_list()` got relaxed to work even if
XPU device is not available. However, we overlooked the case when
pytorch is not compiled with XPU support. In such a case function
throws an exception. This commit adjusts this behavior and makes function
return `[]` even if pytorch is not compiled with XPU support.

Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Copy link
pytorch-bot bot commented Feb 19, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/147431

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures

As of commit c290b5b with merge base 525ca80 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@dvrogozh
Copy link
Contributor Author

@pytorchbot label "topic: not user facing"

@guangyey guangyey added ciflow/xpu Run XPU CI tasks ciflow/trunk Trigger trunk jobs on your pull request release notes: xpu release notes category topic: improvements topic category labels Feb 19, 2025
@guangyey guangyey requested review from malfet and removed request for soumith and fmassa February 19, 2025 08:18
@guangyey guangyey requested review from albanD and atalman February 20, 2025 08:25
@guangyey
Copy link
Collaborator

"The failures are unrelated to this PR."
@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 3 checks: xpu / linux-jammy-xpu-2025.0-py3.9 / test (default, 4, 4, linux.idc.xpu), trunk / linux-focal-rocm6.3-py3.10 / test (default, 1, 2, linux.rocm.gpu.2), trunk / linux-focal-rocm6.3-py3.10 / test (default, 2, 2, linux.rocm.gpu.2)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

aditew01 pushed a commit that referenced this pull request Feb 28, 2025
)

Initially discussed here: #132945 (comment)

Previously `torch.xpu.get_arch_list()` got relaxed to work even if XPU device is not available. However, we overlooked the case when pytorch is not compiled with XPU support. In such a case function throws an exception. This commit adjusts this behavior and makes function return `[]` even if pytorch is not compiled with XPU support.

CC: @EikanWang @fengyuan14 @guangyey @malfet @albanD

Pull Request resolved: #147431
Approved by: https://github.com/guangyey, https://github.com/EikanWang, https://github.com/albanD
majing921201 pushed a commit to majing921201/pytorch that referenced this pull request Mar 4, 2025
…rch#147431)

Initially discussed here: pytorch#132945 (comment)

Previously `torch.xpu.get_arch_list()` got relaxed to work even if XPU device is not available. However, we overlooked the case when pytorch is not compiled with XPU support. In such a case function throws an exception. This commit adjusts this behavior and makes function return `[]` even if pytorch is not compiled with XPU support.

CC: @EikanWang @fengyuan14 @guangyey @malfet @albanD

Pull Request resolved: pytorch#147431
Approved by: https://github.com/guangyey, https://github.com/EikanWang, https://github.com/albanD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks Merged open source release notes: xpu release notes category topic: improvements topic category topic: not user facing topic category
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants
0