Skip to content

[pytorch] Drop aotriton_v2.dll + liblzma.dll wheel force-includes (now upstream) - #9058

Merged
ethanwee1 merged 1 commit into
ROCm:mainfrom
ethanwee1:ethanwee/drop-aotriton-liblzma-forceinclude
Oct 19, 2026
Merged

ethanwee1 merged 1 commit into
ROCm:mainfrom
ethanwee1:ethanwee/drop-aotriton-liblzma-forceinclude

Conversation

@ethanwee1

@ethanwee1 ethanwee1 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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 is removed separately in #9360; whichever of the two merges second should drop the whole now-empty force-include block.

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:

Tracked in AIPYTORCH-1516.

These Flash Attention runtime DLLs are now installed upstream via an
install() rule (pytorch/pytorch #200931), so the scikit-build-core
force-include workaround is no longer needed. libomp140 stays until its
own upstream PR (#191629) lands.
@therock-pr-bot

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

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ 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
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 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 15, 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.

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the prerequisite PRs are merged to PyTorch upstream and our release branches

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
@ethanwee1
ethanwee1 merged commit ad7fc2b into ROCm:main Oct 19, 2026
117 of 136 checks passed
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Oct 19, 2026
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.
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