[ROCm/Windows] Support load_inline on windows#162577
[ROCm/Windows] Support load_inline on windows#162577jammm wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/162577
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7f135b0 with merge base b494547 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
cc @msaroufim |
|
@pytorchbot label "release notes: rocm" |
|
@pytorchbot label "module: rocm" |
|
@pytorchbot label "module: windows" |
|
Do we have rocm windows machines in CI. Not sure how I'd go about testing this since I don't know an AMD gaming card either |
Not yet, it's WIP #160776 |
torch/utils/cpp_extension.py
Outdated
| COMMON_HIP_FLAGS.extend(['-fms-runtime-lib=dll']) | ||
| cflags = common_cflags + ['/std:c++17'] + extra_cflags | ||
| cflags += COMMON_HIP_FLAGS if IS_HIP_EXTENSION else COMMON_MSVC_FLAGS | ||
| cflags += COMMON_MSVC_FLAGS + COMMON_HIP_FLAGS if IS_HIP_EXTENSION else [] |
There was a problem hiding this comment.
hol' up, you got rid of COMMON_MSVC_FLAGS in the non IS_HIP_EXTENSION case!!
There was a problem hiding this comment.
Ah thanks for the catch. How about cflags += COMMON_MSVC_FLAGS + (COMMON_HIP_FLAGS if IS_HIP_EXTENSION else []) ? Adding brackets around it so COMMON_MSVC_FLAGS is always added
ezyang
left a comment
There was a problem hiding this comment.
non-HIP codepath affected
0ebf64c to
7f135b0
Compare
|
@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: 1 jobs have failed, first few of them are: trunk / win-vs2022-cpu-py3 / build Details for Dev Infra teamRaised by workflow job |
|
@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 |
Supports `torch.utils.cpp_extension.load_inline` on Windows with ROCm. Tested on Windows with gfx1201. Note that it currently only works when CC and CXX are set to `clang-cl`. This is also needed when building extensions via. `setuptools` due to linker errors when using `cl` directly. Pull Request resolved: pytorch#162577 Approved by: https://github.com/ezyang
Supports `torch.utils.cpp_extension.load_inline` on Windows with ROCm. Tested on Windows with gfx1201. Note that it currently only works when CC and CXX are set to `clang-cl`. This is also needed when building extensions via. `setuptools` due to linker errors when using `cl` directly. Pull Request resolved: pytorch#162577 Approved by: https://github.com/ezyang
Supports `torch.utils.cpp_extension.load_inline` on Windows with ROCm. Tested on Windows with gfx1201. Note that it currently only works when CC and CXX are set to `clang-cl`. This is also needed when building extensions via. `setuptools` due to linker errors when using `cl` directly. Pull Request resolved: pytorch#162577 Approved by: https://github.com/ezyang
Supports `torch.utils.cpp_extension.load_inline` on Windows with ROCm. Tested on Windows with gfx1201. Note that it currently only works when CC and CXX are set to `clang-cl`. This is also needed when building extensions via. `setuptools` due to linker errors when using `cl` directly. Pull Request resolved: pytorch#162577 Approved by: https://github.com/ezyang
Supports
torch.utils.cpp_extension.load_inlineon Windows with ROCm.Tested on Windows with gfx1201.
Note that it currently only works when CC and CXX are set to
clang-cl. This is also needed when building extensions via.setuptoolsdue to linker errors when usingcldirectly.cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd