Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/174753
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 6e64143 with merge base d6f69da ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot merge -f "Looks like it generates something" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
After following PR:#174753 The new approach extracts libtorch from wheels via ``.ci/libtorch/extract_libtorch_from_wheel.py`` instead of using dedicated Docker images to build libtorch. We don't need these Docker builds anymore. Pull Request resolved: #177802 Approved by: https://github.com/huydhn, https://github.com/malfet
After following PR:pytorch#174753 The new approach extracts libtorch from wheels via ``.ci/libtorch/extract_libtorch_from_wheel.py`` instead of using dedicated Docker images to build libtorch. We don't need these Docker builds anymore. Pull Request resolved: pytorch#177802 Approved by: https://github.com/huydhn, https://github.com/malfet
…174753) Because all one has to do is just extract files from wheels to generate a libtorch artifacts Claude-coded Pull Request resolved: pytorch#174753 Approved by: https://github.com/seemethere, https://github.com/atalman
After following PR:pytorch#174753 The new approach extracts libtorch from wheels via ``.ci/libtorch/extract_libtorch_from_wheel.py`` instead of using dedicated Docker images to build libtorch. We don't need these Docker builds anymore. Pull Request resolved: pytorch#177802 Approved by: https://github.com/huydhn, https://github.com/malfet
PR #174753 switched libtorch packaging from a dedicated build to extracting from pre-built wheels. The extraction script copies libraries from torch/lib/ but doesn't bundle NVIDIA dependency libraries (cudnn, nccl, nvshmem, cublas, etc.) or fix RPATH, causing runtime failures like `libnvshmem_host.so.3 => not found`. The wheel's .so files have RPATH set to $ORIGIN/../../nvidia/*/lib for pip site-packages layout, which doesn't exist in the libtorch directory structure. The old build_libtorch.sh handled this by copying deps and patching RPATH to $ORIGIN in a post-processing step. This restores that behavior in the extraction path: for shared-with-deps variants, copy NVIDIA libs from pip site-packages into libtorch/lib/, then rewrite RPATH to $ORIGIN on all .so files. The CI workflow is updated to pip install the NVIDIA packages before extraction. Fixes #183971
PR #174753 switched libtorch packaging from a dedicated build to extracting from pre-built wheels. The extraction script copies libraries from torch/lib/ but doesn't fix RPATH, causing runtime failures like `libnvshmem_host.so.3 => not found`. The wheel's .so files have RPATH set to $ORIGIN/../../nvidia/*/lib for the pip site-packages layout, which doesn't exist in the libtorch directory structure. The old build_libtorch.sh used patchelf to set RPATH to $ORIGIN in a post-processing step. This adds a pure-Python ELF RPATH rewriter to the extraction script that overwrites the wheel's RPATH with $ORIGIN, so libraries in libtorch/lib/ find their siblings. NVIDIA deps (cudnn, nccl, nvshmem, etc.) are found from the user's system CUDA installation, matching the old libtorch behavior. Fixes #183971
|
Reporting my finding as to why CI didn't catch the issue #183971:
To trigger the extraction on the PR, |
…#187837) Fixes #187812 ## Problem The Windows libtorch CD packages for x86_64 and arm64 are generated with the **same filename** and uploaded to the **same S3 location**, so the arm64 build clobbers the x86_64 one. Users downloading the Windows x64 libtorch release actually receive Aarch64 binaries (`c10.dll: PE32+ executable (DLL) (GUI) Aarch64`). ## Root cause `compute_zip_prefix()` in `.ci/libtorch/extract_libtorch_from_wheel.py` returned `libtorch-win-shared-with-deps` for every Windows build regardless of architecture (the docstring even named `libtorch-win-arm64-shared-with-deps`, but the code never produced it). Both x86_64 and arm64 are CPU builds, so the upload subfolder (`DESIRED_CUDA=cpu`) and the zip filename were identical, and the S3 object key is the zip filename. The arch-blind naming was introduced in #174753 (which added the wheel-extraction approach); the collision became live once the windows-arm64 wheel workflow started running the same extraction in #181586. ## Fix Thread architecture through the extraction so arm64 produces `libtorch-win-arm64-shared-with-deps-{version}.zip` while x86_64 keeps its existing `libtorch-win-shared-with-deps-{version}.zip` name (preserving the public download URL). `generate_libtorch_extraction_configs` also gives the arm64 job a distinct `build_name` so the GitHub artifact and job names no longer alias. ## Test Plan Verified prefix logic: ``` x86_64 -> libtorch-win-shared-with-deps arm64 -> libtorch-win-arm64-shared-with-deps ``` Regenerated the binary build workflows (`python .github/scripts/generate_ci_workflows.py`); the windows-arm64 wheel workflow now passes `--arch arm64` and uploads a distinct `libtorch-arm64-cpu-shared-with-deps-release` artifact, while the x86_64 workflow is unchanged apart from an explicit `--arch x86_64`. This PR was authored with the assistance of an AI coding assistant (Claude Code). Pull Request resolved: #187837 Approved by: https://github.com/Skylion007, https://github.com/huydhn, https://github.com/malfet
…#187973) Fix Windows libtorch x86_64 and arm64 packages overwriting each other (#187837) Fixes #187812 ## Problem The Windows libtorch CD packages for x86_64 and arm64 are generated with the **same filename** and uploaded to the **same S3 location**, so the arm64 build clobbers the x86_64 one. Users downloading the Windows x64 libtorch release actually receive Aarch64 binaries (`c10.dll: PE32+ executable (DLL) (GUI) Aarch64`). ## Root cause `compute_zip_prefix()` in `.ci/libtorch/extract_libtorch_from_wheel.py` returned `libtorch-win-shared-with-deps` for every Windows build regardless of architecture (the docstring even named `libtorch-win-arm64-shared-with-deps`, but the code never produced it). Both x86_64 and arm64 are CPU builds, so the upload subfolder (`DESIRED_CUDA=cpu`) and the zip filename were identical, and the S3 object key is the zip filename. The arch-blind naming was introduced in #174753 (which added the wheel-extraction approach); the collision became live once the windows-arm64 wheel workflow started running the same extraction in #181586. ## Fix Thread architecture through the extraction so arm64 produces `libtorch-win-arm64-shared-with-deps-{version}.zip` while x86_64 keeps its existing `libtorch-win-shared-with-deps-{version}.zip` name (preserving the public download URL). `generate_libtorch_extraction_configs` also gives the arm64 job a distinct `build_name` so the GitHub artifact and job names no longer alias. ## Test Plan Verified prefix logic: ``` x86_64 -> libtorch-win-shared-with-deps arm64 -> libtorch-win-arm64-shared-with-deps ``` Regenerated the binary build workflows (`python .github/scripts/generate_ci_workflows.py`); the windows-arm64 wheel workflow now passes `--arch arm64` and uploads a distinct `libtorch-arm64-cpu-shared-with-deps-release` artifact, while the x86_64 workflow is unchanged apart from an explicit `--arch x86_64`. This PR was authored with the assistance of an AI coding assistant (Claude Code). Pull Request resolved: #187837 Approved by: https://github.com/Skylion007, https://github.com/huydhn, https://github.com/malfet (cherry picked from commit 599fb5c) Co-authored-by: atalman <[email protected]>
After following PR:pytorch#174753 The new approach extracts libtorch from wheels via ``.ci/libtorch/extract_libtorch_from_wheel.py`` instead of using dedicated Docker images to build libtorch. We don't need these Docker builds anymore. Pull Request resolved: pytorch#177802 Approved by: https://github.com/huydhn, https://github.com/malfet
…pytorch#187837) Fixes pytorch#187812 ## Problem The Windows libtorch CD packages for x86_64 and arm64 are generated with the **same filename** and uploaded to the **same S3 location**, so the arm64 build clobbers the x86_64 one. Users downloading the Windows x64 libtorch release actually receive Aarch64 binaries (`c10.dll: PE32+ executable (DLL) (GUI) Aarch64`). ## Root cause `compute_zip_prefix()` in `.ci/libtorch/extract_libtorch_from_wheel.py` returned `libtorch-win-shared-with-deps` for every Windows build regardless of architecture (the docstring even named `libtorch-win-arm64-shared-with-deps`, but the code never produced it). Both x86_64 and arm64 are CPU builds, so the upload subfolder (`DESIRED_CUDA=cpu`) and the zip filename were identical, and the S3 object key is the zip filename. The arch-blind naming was introduced in pytorch#174753 (which added the wheel-extraction approach); the collision became live once the windows-arm64 wheel workflow started running the same extraction in pytorch#181586. ## Fix Thread architecture through the extraction so arm64 produces `libtorch-win-arm64-shared-with-deps-{version}.zip` while x86_64 keeps its existing `libtorch-win-shared-with-deps-{version}.zip` name (preserving the public download URL). `generate_libtorch_extraction_configs` also gives the arm64 job a distinct `build_name` so the GitHub artifact and job names no longer alias. ## Test Plan Verified prefix logic: ``` x86_64 -> libtorch-win-shared-with-deps arm64 -> libtorch-win-arm64-shared-with-deps ``` Regenerated the binary build workflows (`python .github/scripts/generate_ci_workflows.py`); the windows-arm64 wheel workflow now passes `--arch arm64` and uploads a distinct `libtorch-arm64-cpu-shared-with-deps-release` artifact, while the x86_64 workflow is unchanged apart from an explicit `--arch x86_64`. This PR was authored with the assistance of an AI coding assistant (Claude Code). Pull Request resolved: pytorch#187837 Approved by: https://github.com/Skylion007, https://github.com/huydhn, https://github.com/malfet
…pytorch#187837) Fixes pytorch#187812 ## Problem The Windows libtorch CD packages for x86_64 and arm64 are generated with the **same filename** and uploaded to the **same S3 location**, so the arm64 build clobbers the x86_64 one. Users downloading the Windows x64 libtorch release actually receive Aarch64 binaries (`c10.dll: PE32+ executable (DLL) (GUI) Aarch64`). ## Root cause `compute_zip_prefix()` in `.ci/libtorch/extract_libtorch_from_wheel.py` returned `libtorch-win-shared-with-deps` for every Windows build regardless of architecture (the docstring even named `libtorch-win-arm64-shared-with-deps`, but the code never produced it). Both x86_64 and arm64 are CPU builds, so the upload subfolder (`DESIRED_CUDA=cpu`) and the zip filename were identical, and the S3 object key is the zip filename. The arch-blind naming was introduced in pytorch#174753 (which added the wheel-extraction approach); the collision became live once the windows-arm64 wheel workflow started running the same extraction in pytorch#181586. ## Fix Thread architecture through the extraction so arm64 produces `libtorch-win-arm64-shared-with-deps-{version}.zip` while x86_64 keeps its existing `libtorch-win-shared-with-deps-{version}.zip` name (preserving the public download URL). `generate_libtorch_extraction_configs` also gives the arm64 job a distinct `build_name` so the GitHub artifact and job names no longer alias. ## Test Plan Verified prefix logic: ``` x86_64 -> libtorch-win-shared-with-deps arm64 -> libtorch-win-arm64-shared-with-deps ``` Regenerated the binary build workflows (`python .github/scripts/generate_ci_workflows.py`); the windows-arm64 wheel workflow now passes `--arch arm64` and uploads a distinct `libtorch-arm64-cpu-shared-with-deps-release` artifact, while the x86_64 workflow is unchanged apart from an explicit `--arch x86_64`. This PR was authored with the assistance of an AI coding assistant (Claude Code). Pull Request resolved: pytorch#187837 Approved by: https://github.com/Skylion007, https://github.com/huydhn, https://github.com/malfet
Fixes the "libnvshmem_host.so.3 => not found" regression (#183971) in the CUDA libtorch shared-with-deps tarball. Root cause: libtorch is now assembled by extracting torch/lib/ from the pip wheel (#174753). The wheel is a "small wheel" (#180612): its NVIDIA runtime deps -- libnvshmem_host.so.3, libcudart.so.13, libcublas, libcudnn, ... -- are not in torch/lib/ but supplied at runtime by the pip nvidia-* packages via an RPATH into site-packages/nvidia/*/lib. The libtorch tarball has no such packages, so the extracted libtorch/lib/ shipped torch's own libtorch_nvshmem.so (which hard-NEEDs libnvshmem_host.so.3) with nothing to satisfy it. Fix: for linux CUDA shared-with-deps, bundle_cuda_deps() copies the required NVIDIA runtime libraries into libtorch/lib/ before the RPATH rewrite. It resolves NEEDED entries transitively starting from the torch libs, copying any soname that exists under the CUDA toolkit dirs in the builder container (/usr/local/cuda/lib64 and the CUPTI dir). Only libraries found there are copied, so base system libs and the driver stub (libcuda.so.1) are correctly left to the runtime environment. fix_rpath() then stamps $ORIGIN on the copied libs so the flat lib/ is self-resolving. This restores the pre-#180612 self-contained tarball while leaving the pip wheel untouched/small. Chose a transitive NEEDED resolver over reinstating the old hardcoded DEPS_LIST so it auto-adapts to CUDA version and the static->dynamic linking changes, and self-filters system libs by construction. smoke_test_extract_libtorch.py gains check_regression_deps(): if a consumer lib is present (libtorch_nvshmem.so / libtorch_cuda.so), its NVIDIA runtime dep (libnvshmem_host.so* / libcudart.so*) must be bundled -- a direct guard against this regression recurring. Test Plan: Local static checks (no CUDA builder / wheel available on this host): ``` python3 -m py_compile .ci/libtorch/extract_libtorch_from_wheel.py python3 -m py_compile .ci/libtorch/smoke_test_extract_libtorch.py ``` Full validation is the libtorch-extract CI job on a CUDA config: the log should show "Bundled CUDA dep: libnvshmem_host.so.3 ..." (plus cudart/cublas/cudnn), the smoke test's check_regression_deps must pass, and `ldd libtorch_nvshmem.so` on the extracted tree must not report libnvshmem_host.so.3 as not found. Authored with assistance from an AI coding assistant (Claude). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Fixes the "libnvshmem_host.so.3 => not found" regression (#183971) in the CUDA libtorch shared-with-deps tarball. Root cause: libtorch is now assembled by extracting torch/lib/ from the pip wheel (#174753). The wheel is a "small wheel" (#180612): its NVIDIA runtime deps -- libnvshmem_host.so.3, libcudart.so.13, libcublas, libcudnn, ... -- are not in torch/lib/ but supplied at runtime by the pip nvidia-* packages via an RPATH into site-packages/nvidia/*/lib. The libtorch tarball has no such packages, so the extracted libtorch/lib/ shipped torch's own libtorch_nvshmem.so (which hard-NEEDs libnvshmem_host.so.3) with nothing to satisfy it. Fix: for linux CUDA shared-with-deps, bundle_cuda_deps() copies the required NVIDIA runtime libraries into libtorch/lib/ before the RPATH rewrite. It resolves NEEDED entries transitively starting from the torch libs, copying any soname that exists under the CUDA toolkit dirs in the builder container (/usr/local/cuda/lib64 and the CUPTI dir). Only libraries found there are copied, so base system libs and the driver stub (libcuda.so.1) are correctly left to the runtime environment. fix_rpath() then stamps $ORIGIN on the copied libs so the flat lib/ is self-resolving. This restores the pre-#180612 self-contained tarball while leaving the pip wheel untouched/small. Chose a transitive NEEDED resolver over reinstating the old hardcoded DEPS_LIST so it auto-adapts to CUDA version and the static->dynamic linking changes, and self-filters system libs by construction. smoke_test_extract_libtorch.py: now that the deps are bundled, restore the full ctypes.CDLL("libtorch.so") load in check_load() -- it resolves the entire NEEDED chain through the $ORIGIN RPATH, so a missing or mis-rpath'd bundled lib fails the test. This was previously removed (it failed on CUDA when deps were not bundled); with bundling it works, and since libcuda.so.1 is dlopen'd lazily by cudart (not a load-time NEEDED) it succeeds on a driverless builder. check_regression_deps() is kept as a fast, explicit guard with a clear message if a consumer lib (libtorch_nvshmem.so / libtorch_cuda.so) is present without its bundled NVIDIA runtime dep. Test Plan: Local static checks (no CUDA builder / wheel available on this host): ``` python3 -m py_compile .ci/libtorch/extract_libtorch_from_wheel.py python3 -m py_compile .ci/libtorch/smoke_test_extract_libtorch.py ``` Full validation is the libtorch-extract CI job on a CUDA config: the log should show "Bundled CUDA dep: libnvshmem_host.so.3 ..." (plus cudart/cublas/cudnn), and the smoke test's check_load must load libtorch.so with no "not found". Authored with assistance from an AI coding assistant (Claude). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Fixes the "libnvshmem_host.so.3 => not found" regression (#183971) in the CUDA libtorch shared-with-deps tarball. Root cause: libtorch is now assembled by extracting torch/lib/ from the pip wheel (#174753). The wheel is a "small wheel" (#180612): its NVIDIA runtime deps -- libnvshmem_host.so.3, libcudart.so.13, libcublas, libcudnn, ... -- are not in torch/lib/ but supplied at runtime by the pip nvidia-* packages via an RPATH into site-packages/nvidia/*/lib. The libtorch tarball has no such packages, so the extracted libtorch/lib/ shipped torch's own libtorch_nvshmem.so (which hard-NEEDs libnvshmem_host.so.3) with nothing to satisfy it. Fix: for linux CUDA shared-with-deps, bundle_cuda_deps() copies the required NVIDIA runtime libraries into libtorch/lib/ before the RPATH rewrite. It resolves NEEDED entries transitively starting from the torch libs, copying any soname that exists under the CUDA toolkit dirs in the builder container (/usr/local/cuda/lib64 and the CUPTI dir). Only libraries found there are copied, so base system libs and the driver stub (libcuda.so.1) are correctly left to the runtime environment. fix_rpath() then stamps $ORIGIN on the copied libs so the flat lib/ is self-resolving. This restores the pre-#180612 self-contained tarball while leaving the pip wheel untouched/small. Chose a transitive NEEDED resolver over reinstating the old hardcoded DEPS_LIST so it auto-adapts to CUDA version and the static->dynamic linking changes, and self-filters system libs by construction. smoke_test_extract_libtorch.py is a single ctypes.CDLL("libtorch.so") load: it resolves the whole NEEDED chain through the $ORIGIN RPATH, so a missing or mis-rpath'd bundled dep (torch or NVIDIA runtime) fails the test. Full dlopen was previously dropped because it failed when deps were not bundled; with bundling it works, and since libcuda.so.1 is dlopen'd lazily by cudart (not a load-time NEEDED) it succeeds on a driverless builder. Test Plan: Local static checks (no CUDA builder / wheel available on this host): ``` python3 -m py_compile .ci/libtorch/extract_libtorch_from_wheel.py python3 -m py_compile .ci/libtorch/smoke_test_extract_libtorch.py ``` Full validation is the libtorch-extract CI job on a CUDA config: the log should show "Bundled CUDA dep: libnvshmem_host.so.3 ..." (plus cudart/cublas/cudnn), and the smoke test must load libtorch.so with no "not found". Authored with assistance from an AI coding assistant (Claude). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Fixes the "libnvshmem_host.so.3 => not found" regression (#183971) in the CUDA libtorch shared-with-deps tarball. Root cause: libtorch is now assembled by extracting torch/lib/ from the pip wheel (#174753). The wheel is a "small wheel" (#180612): its NVIDIA runtime deps -- libnvshmem_host.so.3, libcudart.so.13, libcublas, libcudnn, ... -- are not in torch/lib/ but supplied at runtime by the pip nvidia-* packages via an RPATH into site-packages/nvidia/*/lib. The libtorch tarball has no such packages, so the extracted libtorch/lib/ shipped torch's own libtorch_nvshmem.so (which hard-NEEDs libnvshmem_host.so.3) with nothing to satisfy it. Fix: for linux CUDA shared-with-deps, bundle_cuda_deps() copies the required NVIDIA runtime libraries into libtorch/lib/ before the RPATH rewrite. It resolves NEEDED entries transitively starting from the torch libs, copying any soname that exists under the CUDA toolkit dirs in the builder container (/usr/local/cuda/lib64 and the CUPTI dir). Only libraries found there are copied, so base system libs and the driver stub (libcuda.so.1) are correctly left to the runtime environment. fix_rpath() then stamps $ORIGIN on the copied libs so the flat lib/ is self-resolving. This restores the pre-#180612 self-contained tarball while leaving the pip wheel untouched/small. Chose a transitive NEEDED resolver over reinstating the old hardcoded DEPS_LIST so it auto-adapts to CUDA version and the static->dynamic linking changes, and self-filters system libs by construction. smoke_test_extract_libtorch.py is a single ctypes.CDLL("libtorch.so") load: it resolves the whole NEEDED chain through the $ORIGIN RPATH, so a missing or mis-rpath'd bundled dep (torch or NVIDIA runtime) fails the test. Full dlopen was previously dropped because it failed when deps were not bundled; with bundling it works, and since libcuda.so.1 is dlopen'd lazily by cudart (not a load-time NEEDED) it succeeds on a driverless builder. Test Plan: Local static checks (no CUDA builder / wheel available on this host): ``` python3 -m py_compile .ci/libtorch/extract_libtorch_from_wheel.py python3 -m py_compile .ci/libtorch/smoke_test_extract_libtorch.py ``` Full validation is the libtorch-extract CI job on a CUDA config: the log should show "Bundled CUDA dep: libnvshmem_host.so.3 ..." (plus cudart/cublas/cudnn), and the smoke test must load libtorch.so with no "not found". Authored with assistance from an AI coding assistant (Claude). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This PR adds an RPATH rewriter to the extraction logic that resets RPATH to $ORIGIN. NVIDIA deps (cudnn,nccl, nvshmem, etc.) are resolved from the user's system CUDA installation via LD_LIBRARY_PATH/ldconfig, matching the old libtorch behavior. PR #174753 switched libtorch packaging from a dedicated build to extracting from pre-built wheels. The wheel's .so files have RPATH set to `$ORIGIN/../../nvidia/*/lib` for pip site-packages layout, which doesn't exist in the libtorch directory structure. The old build_libtorch.sh handled this by copying deps and patching RPATH to $ORIGIN in a post-processing step. The extraction script copies libraries from torch/lib/ but missed to fix RPATH, causing runtime failures like `libnvshmem_host.so.3 => not found`. Note on why this PR is enough: Before PR #174753, Linux libtorch was built for CPU + all CUDA arches + all ROCm arches as a standalone CMake build. That build ran inside a CUDA Docker container where build_libtorch.sh could copy libgomp (and other DEPS_LIST deps) from the container's filesystem. So the old flow was: 1. generate_libtorch_matrix → standalone build matrix (CPU, CUDA, ROCm) 2. CI runs build_cuda.sh → sets DEPS_LIST (libgomp, aarch64 extras) + BUILD_PYTHONLESS=1 3. Sources build_libtorch.sh → CMake build via tools/build_libtorch.py, copies DEPS_LIST into libtorch/lib/, sets rpath to $ORIGIN PR #174753 replaced that with: extract from the already-built wheel. The wheel already has libgomp in torch/lib/, so copy_libraries picks it up. The only missing piece was the rpath fix. Fixes #183971 Created with Assistance from Claude Pull Request resolved: #184336 Approved by: https://github.com/nWEIdia, https://github.com/atalman, https://github.com/malfet Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Stack from ghstack (oldest at bottom):
Because all one has to do is just extract files from wheels to generate a libtorch artifacts
Claude-coded
cc @albanD