Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/200931
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit ca4d250 with merge base 09cc6ff ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ScottTodd
left a comment
There was a problem hiding this comment.
LGTM from the perspective of ROCm on Windows
When Flash Attention is built on Windows, aotriton ExternalProject drops aotriton_v2.dll and its liblzma.dll dependency into torch/lib/ with no install() rule, so scikit-build-core omits them and torch_hip.dll fails to load (WinError 126). Install both when present, mirroring the libiomp5md.dll / uv.dll handling. EXISTS-guarded, so non-ROCm and Flash-Attention-off builds are unaffected. Fixes ROCm/TheRock#6965
a04603f to
3c30082
Compare
|
|
…packaged aotriton's ExternalProject produces aotriton_v2.dll/liblzma.dll in torch/lib during the build, after configure. The configure-time EXISTS guard was false, so the install rules never registered and the DLLs were dropped from the wheel (WinError 126 loading torch_hip.dll). OPTIONAL defers the existence check to install time, after the build has generated them.
|
My agent came up with this analysis, but I've read and approved it.
|
…heels (#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: - #191629: install `libomp140.x86_64.dll` via CMake (this PR) - #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 #191629 + #200931 - ROCm#3836: release/2.15 cherry-pick of #191629 + #200931 - Issue: ROCm/TheRock#6965 Fixes ROCm/TheRock#6965 Supported by @jeffdaily Tracked in AIPYTORCH-1516. Pull Request resolved: #191629 Approved by: https://github.com/jithunnair-amd, https://github.com/ScottTodd, https://github.com/jeffdaily
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 5 checks: pull / linux-jammy-aarch64-py3.11-clang21 / build, trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), linux-aarch64-binary-manywheel / manywheel-cuda-aarch64-cu134-build, linux-aarch64-binary-manywheel / manywheel-cuda-aarch64-cu132-build, linux-aarch64-binary-manywheel / manywheel-cuda-aarch64-cu130-build Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Both PRs add a Windows DLL install block at the same spot in cmake/PostBuildSteps.cmake. Keep both: the aotriton_v2/liblzma OPTIONAL install from this PR, then the libomp140 install from pytorch#191629, the same order as the release/2.14 cherry-pick (#3835). Test Plan: a standalone CMake project that includes the resolved if(WIN32 AND BUILD_PYTHON) block, with the FA DLLs generated at build time by a custom target, configured, built and installed with Ninja: all three DLLs installed when present; only the FA DLLs when libomp140 is absent; nothing and no error when none exist. Authored with Claude.
|
@pytorchbot merge -i |
Merge failedReason: New commits were pushed while merging. Please rerun the merge command. Details for Dev Infra teamRaised by workflow job |
Merge startedYour change will be merged while ignoring the following 0 checks: 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 / linux-noble-rocm-py3.11-mi350 / test (default, 8, 8, linux.rocm.gpu.mi350.dpx.1) Details for Dev Infra teamRaised by workflow job |
…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.
|
Failed trunk job ran no tests. The MI350 runner pod never came online ("Pending: backoff timeout") and every step errored out. It passed on rerun (job 117284075918). |
|
@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 |
… 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.
… 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.
… 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.
…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
When Flash Attention is built on Windows,
torch_hip.dllneedsaotriton_v2.dlland itsliblzma.dlldependency. aotriton's ExternalProject generates these intotorch/lib/during the build (after CMake configure) with no install rule, so scikit-build-core omits them from the wheel andimport torchfails 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-timeEXISTSguard 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 torchsanity check passed. The earlierEXISTS-guarded revision failed that check with WinError 126 (https://github.com/ROCm/TheRock/actions/runs/38924233036).Related PR:
libomp140.x86_64.dllvia CMakeaotriton_v2.dll+liblzma.dllvia CMake (this PR)_rocm_init.pywheel force-includeaotriton_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.1ROCm/TheRock#6965Fixes ROCm/TheRock#6965
Supported by @jeffdaily
Tracked in AIPYTORCH-1516.
cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang