- Notifications
You must be signed in to change notification settings - Fork26.3k
Fix TorchCPP Ext accelerator detection ROCm#170784
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
pytorch-botbot commentedDec 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🔗 Helpful Links🧪 See artifacts and rendered test results athud.pytorch.org/pr/170784
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commitc1549ae with merge base562a337 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
linux-foundation-easyclabot commentedDec 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
86b7930 to56d59f7Comparethiagocrepaldi commentedDec 18, 2025
@pytorchbot label "topic: not user facing" |
56d59f7 to4c23370CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
4fa05bc to65f5c63ComparePreviously, _get_build_directory only checked for CUDA and defaulted to'cpu' for all other cases, causing build directory conflicts whenextensions were built for different GPU accelerators (ROCm/HIP, SYCL/XPU).This fix extends accelerator detection to properly handle:- ROCm/HIP: Checks torch.version.hip first (highest priority)- CUDA: Uses torch.backends.cuda.is_built() and torch.version.cuda- SYCL/XPU: Checks torch.xpu._is_compiled() and torch.version.xpu- CPU: Default fallbackThe build directory now includes the correct accelerator prefix(e.g., py310_rocm542, py310_cu118, py310_xpu2024, py310_cpu),preventing conflicts between extensions built for differentaccelerators on the same system.Priority order: ROCm/HIP > CUDA > SYCL/XPU > CPU
65f5c63 toc1549aeComparethiagocrepaldi commentedDec 18, 2025
is it possible to target it to milestone 2.10 due in January? |
Uh oh!
There was an error while loading.Please reload this page.
Previously, _get_build_directory only checked for CUDA and defaulted to 'cpu' for all other cases, causing build directory conflicts when extensions were built for different GPU accelerators (ROCm/HIP, SYCL/XPU).
This fix extends accelerator detection to properly handle:
The build directory now includes the correct accelerator prefix (e.g., py310_rocm542, py310_cu118, py310_xpu2024, py310_cpu), preventing conflicts between extensions built for different accelerators on the same system.
Priority order: ROCm/HIP > CUDA > SYCL/XPU > CPU
Fixes#170778
cc@janeyx99@jeffdaily@sunway513@jithunnair-amd@pruthvistony@ROCmSupport@jataylo@hongxiayang@naromero77amd@pragupta@jerrymannil@xinyazhang