Repository navigation
[pytorch] Drop _rocm_init.py wheel force-include (now upstream) - #9055
Merged
ethanwee1 merged 1 commit intoOct 17, 2026
Merged
Conversation
The _rocm_init.py install landed upstream in pytorch/pytorch torch/CMakeLists.txt (guarded SKBUILD AND USE_ROCM), so the scikit-build-core force-include is no longer needed. Keep the Windows DLL force-includes until their PRs land.
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
This was referenced Oct 15, 2026
Merged
Merged
Closed
ethanwee1
marked this pull request as ready for review
October 16, 2026 17:14
ScottTodd
approved these changes
Oct 16, 2026
prithvip0524
pushed a commit
to prithvip0524/pytorch
that referenced
this pull request
Oct 16, 2026
…heels (pytorch#191629) After the scikit-build-core wheel migration, the Windows ROCm wheel drops `torch/lib/libomp140.x86_64.dll`, which TheRock stages for MSVC OpenMP. This installs it via CMake when present, mirroring the existing `libiomp5md.dll` / `uv.dll` handling. TheRock copies the DLL into `torch/lib/` before CMake configure, so the `EXISTS` guard sees it, and non-ROCm builds are unaffected. It replaces the temporary force-include TheRock carries. Validation: https://github.com/ROCm/TheRock/actions/runs/38930228545 built a Windows ROCm wheel (gfx1100, py3.12) from release/2.14 with this change cherry-picked (ROCm#3835, `268bf8ed4be`); build and the `import torch` sanity check passed. TheRock still force-includes libomp140 in that build, so it confirms no regression rather than exercising this rule in isolation. Related PR: - pytorch#191629: install `libomp140.x86_64.dll` via CMake (this PR) - pytorch#200931: install `aotriton_v2.dll` + `liblzma.dll` via CMake - ROCm/TheRock#9055: drop the `_rocm_init.py` wheel force-include - ROCm/TheRock#9058: drop the `aotriton_v2.dll` + `liblzma.dll` wheel force-includes - ROCm#3835: release/2.14 cherry-pick of pytorch#191629 + pytorch#200931 - ROCm#3836: release/2.15 cherry-pick of pytorch#191629 + pytorch#200931 - Issue: ROCm/TheRock#6965 Fixes ROCm/TheRock#6965 Supported by @jeffdaily Tracked in AIPYTORCH-1516. Pull Request resolved: pytorch#191629 Approved by: https://github.com/jithunnair-amd, https://github.com/ScottTodd, https://github.com/jeffdaily
jeffdaily
approved these changes
Oct 16, 2026
ethanwee1
added a commit
that referenced
this pull request
Oct 19, 2026
…w upstream) (#9058) ## Problem TheRock force-includes `aotriton_v2.dll` and its `liblzma.dll` dependency into the Windows ROCm wheel as a scikit-build-core workaround. pytorch/pytorch#200931 installs them via CMake instead, so the force-include becomes redundant. ## Changes Remove the `aotriton_v2.dll` + `liblzma.dll` force-includes from `build_prod_wheels.py`. The `libomp140.x86_64.dll` force-include stays until its own follow-up. ## Validation https://github.com/ROCm/TheRock/actions/runs/38930228545 ran this PR's head (`429936c345`) against release/2.14 with the install rule cherry-picked (ROCm/pytorch#3835). With the force-include gone, the DLLs could only ship via the CMake rule; build and the `import torch` sanity check passed. Merge only after pytorch/pytorch#200931 is on main and ROCm/pytorch#3835 / ROCm/pytorch#3836 are on release/2.14 / release/2.15; any scikit-build-core branch without the install rule would lose the DLLs (WinError 126). release/2.13 uses setuptools and is unaffected. Merges cleanly alongside #9055. Related PR: - pytorch/pytorch#191629: install `libomp140.x86_64.dll` via CMake - pytorch/pytorch#200931: install `aotriton_v2.dll` + `liblzma.dll` via CMake - #9055: drop the `_rocm_init.py` wheel force-include - #9058: drop the `aotriton_v2.dll` + `liblzma.dll` wheel force-includes (this PR) - ROCm/pytorch#3835: release/2.14 cherry-pick of pytorch/pytorch#191629 + pytorch/pytorch#200931 - ROCm/pytorch#3836: release/2.15 cherry-pick of pytorch/pytorch#191629 + pytorch/pytorch#200931 - Issue: #6965 Tracked in AIPYTORCH-1516.
Nicoshev
pushed a commit
to Nicoshev/pytorch
that referenced
this pull request
Oct 19, 2026
…uild ROCm wheels (pytorch#200931) When Flash Attention is built on Windows, `torch_hip.dll` needs `aotriton_v2.dll` and its `liblzma.dll` dependency. aotriton's ExternalProject generates these into `torch/lib/` during the build (after CMake configure) with no install rule, so scikit-build-core omits them from the wheel and `import torch` fails with WinError 126. This adds CMake install rules for both DLLs with `OPTIONAL`, so the existence check runs at install time, after the build has produced them. A configure-time `EXISTS` guard would be false and silently drop them. Flash-Attention-off and non-ROCm builds are unaffected because the files won't exist at install time. It replaces the temporary force-include TheRock carries. Validation: https://github.com/ROCm/TheRock/actions/runs/38930228545 built a Windows ROCm wheel (gfx1100, py3.12) from release/2.14 with this change cherry-picked (ROCm#3835, identical cmake) and with TheRock's aotriton/liblzma force-include removed (ROCm/TheRock#9058), so the DLLs could only ship via this rule. Build and the `import torch` sanity check passed. The earlier `EXISTS`-guarded revision failed that check with WinError 126 (https://github.com/ROCm/TheRock/actions/runs/38924233036). Related PR: - pytorch#191629: install `libomp140.x86_64.dll` via CMake - pytorch#200931: install `aotriton_v2.dll` + `liblzma.dll` via CMake (this PR) - ROCm/TheRock#9055: drop the `_rocm_init.py` wheel force-include - ROCm/TheRock#9058: drop the `aotriton_v2.dll` + `liblzma.dll` wheel force-includes - ROCm/TheRock#9360: drop the `libomp140.x86_64.dll` wheel force-include - ROCm#3835: release/2.14 cherry-pick of pytorch#191629 + pytorch#200931 - ROCm#3836: release/2.15 cherry-pick of pytorch#191629 + pytorch#200931 - Issue: ROCm/TheRock#6965 Fixes ROCm/TheRock#6965 Supported by @jeffdaily Tracked in AIPYTORCH-1516. Pull Request resolved: pytorch#200931 Approved by: https://github.com/ScottTodd, https://github.com/jeffdaily Co-authored-by: Jeff Daily <jeff.daily@amd.com>
jeffdaily
pushed a commit
to ROCm/pytorch
that referenced
this pull request
Oct 20, 2026
… libomp140 (#3835) Cherry-picks the two upstream Windows ROCm wheel DLL install fixes onto `release/2.14` (scikit-build-core backend): `aotriton_v2.dll` + `liblzma.dll` (pytorch#200931) and `libomp140.x86_64.dll` (pytorch#191629). Without them, once TheRock's temporary force-includes are removed the DLLs drop out of the wheel and `import torch` fails with WinError 126. The aotriton/liblzma install uses `OPTIONAL` so the existence check runs at install time, because aotriton's ExternalProject only generates those DLLs during the build. ### Validation https://github.com/ROCm/TheRock/actions/runs/38930228545 built this branch's head (`268bf8ed4be`) with ROCm/TheRock#9058 (aotriton/liblzma force-include removed), so those DLLs could only ship via the install rule. Build and the `import torch` sanity check passed. Related PR: - pytorch#191629: install `libomp140.x86_64.dll` via CMake - pytorch#200931: install `aotriton_v2.dll` + `liblzma.dll` via CMake - ROCm/TheRock#9055: drop the `_rocm_init.py` wheel force-include - ROCm/TheRock#9058: drop the `aotriton_v2.dll` + `liblzma.dll` wheel force-includes - ROCm/TheRock#9360: drop the `libomp140.x86_64.dll` wheel force-include - #3835: release/2.14 cherry-pick of pytorch#191629 + pytorch#200931 (this PR) - #3836: release/2.15 cherry-pick of pytorch#191629 + pytorch#200931 - Issue: ROCm/TheRock#6965 Tracked in AIPYTORCH-1516.
jeffdaily
pushed a commit
to ROCm/pytorch
that referenced
this pull request
Oct 20, 2026
… libomp140 (#3836) Cherry-picks the two upstream Windows ROCm wheel DLL install fixes onto `release/2.15` (scikit-build-core backend): `aotriton_v2.dll` + `liblzma.dll` (pytorch#200931) and `libomp140.x86_64.dll` (pytorch#191629). Without them, once TheRock's temporary force-includes are removed the DLLs drop out of the wheel and `import torch` fails with WinError 126. The aotriton/liblzma install uses `OPTIONAL` so the existence check runs at install time, because aotriton's ExternalProject only generates those DLLs during the build. ### Validation Branch merged with current `release/2.15` (now includes `related_commits` from #3816). Windows ROCm wheel build (gfx1100, py3.12) on this head (`a119523c5bc`) with ROCm/TheRock#9360, which passes no force-include flags, so every DLL can only ship via CMake install: https://github.com/ROCm/TheRock/actions/runs/39287495719. Build and the `import torch` sanity check passed. Related PR: - pytorch#191629: install `libomp140.x86_64.dll` via CMake - pytorch#200931: install `aotriton_v2.dll` + `liblzma.dll` via CMake - ROCm/TheRock#9055: drop the `_rocm_init.py` wheel force-include - ROCm/TheRock#9058: drop the `aotriton_v2.dll` + `liblzma.dll` wheel force-includes - ROCm/TheRock#9360: drop the `libomp140.x86_64.dll` wheel force-include - #3835: release/2.14 cherry-pick of pytorch#191629 + pytorch#200931 - #3836: release/2.15 cherry-pick of pytorch#191629 + pytorch#200931 (this PR) - Issue: ROCm/TheRock#6965 Tracked in AIPYTORCH-1516.
jithunnair-amd
pushed a commit
to ROCm/pytorch
that referenced
this pull request
Nov 4, 2026
… libomp140 (#3836) Cherry-picks the two upstream Windows ROCm wheel DLL install fixes onto `release/2.15` (scikit-build-core backend): `aotriton_v2.dll` + `liblzma.dll` (pytorch#200931) and `libomp140.x86_64.dll` (pytorch#191629). Without them, once TheRock's temporary force-includes are removed the DLLs drop out of the wheel and `import torch` fails with WinError 126. The aotriton/liblzma install uses `OPTIONAL` so the existence check runs at install time, because aotriton's ExternalProject only generates those DLLs during the build. ### Validation Branch merged with current `release/2.15` (now includes `related_commits` from #3816). Windows ROCm wheel build (gfx1100, py3.12) on this head (`a119523c5bc`) with ROCm/TheRock#9360, which passes no force-include flags, so every DLL can only ship via CMake install: https://github.com/ROCm/TheRock/actions/runs/39287495719. Build and the `import torch` sanity check passed. Related PR: - pytorch#191629: install `libomp140.x86_64.dll` via CMake - pytorch#200931: install `aotriton_v2.dll` + `liblzma.dll` via CMake - ROCm/TheRock#9055: drop the `_rocm_init.py` wheel force-include - ROCm/TheRock#9058: drop the `aotriton_v2.dll` + `liblzma.dll` wheel force-includes - ROCm/TheRock#9360: drop the `libomp140.x86_64.dll` wheel force-include - #3835: release/2.14 cherry-pick of pytorch#191629 + pytorch#200931 - #3836: release/2.15 cherry-pick of pytorch#191629 + pytorch#200931 (this PR) - Issue: ROCm/TheRock#6965 Tracked in AIPYTORCH-1516.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
TheRock force-includes
torch/_rocm_init.pyinto the ROCm wheel as a scikit-build-core workaround, but upstream PyTorch now installs that file viatorch/CMakeLists.txt(guardedSKBUILD AND USE_ROCM), so the force-include is redundant.Changes
Remove the
torch/_rocm_init.pyforce-include frombuild_prod_wheels.pyand update the comment. The Windows DLL force-includes stay until their upstream PRs land.Validation
Windows ROCm wheel builds (gfx1100, py3.12) on this PR's head (
523ac105f7) passed build and theimport torchsanity check:_rocm_init.pyas package data)release/2.15 can't be built yet because ROCm/pytorch
release/2.15has norelated_commitsfile (https://github.com/ROCm/TheRock/actions/runs/38811406174 fails at checkout). Merges independently of the other PRs below, and cleanly alongside #9058.Related PR:
libomp140.x86_64.dllvia CMakeaotriton_v2.dll+liblzma.dllvia CMake_rocm_init.pywheel force-include (this PR)aotriton_v2.dll+liblzma.dllwheel force-includeslibomp140.x86_64.dllwheel force-include_rocm_init.py. Windows fails to loadc10_hip.dll, Linux fails to loadlibMIOpen.so.1#6965Tracked in AIPYTORCH-1516.