Skip to content

[pytorch] Drop libomp140.x86_64.dll wheel force-include (now upstream) - #9360

Merged
ethanwee1 merged 2 commits into
ROCm:mainfrom
ethanwee1:ethanwee/drop-libomp140-forceinclude
Oct 20, 2026
Merged

ethanwee1 merged 2 commits into
ROCm:mainfrom
ethanwee1:ethanwee/drop-libomp140-forceinclude

Conversation

@ethanwee1

@ethanwee1 ethanwee1 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

TheRock force-includes libomp140.x86_64.dll into the Windows ROCm wheel as a scikit-build-core workaround. pytorch/pytorch#191629 (merged to main as ada63440da) now installs it via CMake, so the force-include is redundant.

Changes

Remove the libomp140.x86_64.dll force-include from build_prod_wheels.py. With #9055 and #9058 already merged, this was the last scikit-build-core force-include, so the whole block (and the pyproject.toml backend 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 the import torch sanity 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:

JIRA ID: AIPYTORCH-1516
ISSUE ID: #6965

pytorch/pytorch#191629 installs libomp140.x86_64.dll via CMake, so the
scikit-build-core force-include is redundant.
@therock-pr-bot

therock-pr-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: external-builds/pytorch/build_prod_wheels.py; no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Oct 19, 2026
@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@ethanwee1
ethanwee1 marked this pull request as ready for review October 19, 2026 15:34
@ethanwee1
ethanwee1 requested a review from ScottTodd as a code owner 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>
@ethanwee1
ethanwee1 merged commit 02a7bd2 into ROCm:main Oct 20, 2026
203 of 213 checks passed
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants