Repository navigation
[pytorch] Drop libomp140.x86_64.dll wheel force-include (now upstream) - #9360
Merged
ethanwee1 merged 2 commits intoOct 20, 2026
Merged
Conversation
pytorch/pytorch#191629 installs libomp140.x86_64.dll via CMake, so the scikit-build-core force-include is redundant.
This was referenced Oct 19, 2026
Closed
Merged
✅ All Policy Checks Passed
📖 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 |
ethanwee1
marked this pull request as ready for review
October 19, 2026 15:34
…40-forceinclude # Conflicts: # external-builds/pytorch/build_prod_wheels.py
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>
ScottTodd
approved these changes
Oct 20, 2026
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
libomp140.x86_64.dllinto the Windows ROCm wheel as a scikit-build-core workaround. pytorch/pytorch#191629 (merged to main asada63440da) now installs it via CMake, so the force-include is redundant.Changes
Remove the
libomp140.x86_64.dllforce-include frombuild_prod_wheels.py. With #9055 and #9058 already merged, this was the last scikit-build-core force-include, so the whole block (and thepyproject.tomlbackend check it used) goes away.Validation
Windows ROCm wheel build (gfx1100, py3.12) on this PR's head (
652797f15) against release/2.14 with both install rules cherry-picked (ROCm/pytorch#3835,268bf8ed4be): https://github.com/ROCm/TheRock/actions/runs/39279343905. The build passed no force-include flags, so every DLL shipped via CMake install; build and theimport torchsanity check passed.Also passed on release/2.15 with ROCm/pytorch#3836 (
a119523c5bc): https://github.com/ROCm/TheRock/actions/runs/39287495719.Merge after ROCm/pytorch#3835 / ROCm/pytorch#3836 land on release/2.14 / release/2.15. release/2.13 uses setuptools and is unaffected.
Related PR
Related PR:
libomp140.x86_64.dllvia CMakeaotriton_v2.dll+liblzma.dllvia CMake_rocm_init.pywheel force-includeaotriton_v2.dll+liblzma.dllwheel force-includeslibomp140.x86_64.dllwheel force-include (this PR)_rocm_init.py. Windows fails to loadc10_hip.dll, Linux fails to loadlibMIOpen.so.1#6965JIRA ID: AIPYTORCH-1516
ISSUE ID: #6965