Skip to content

package cuda dependencies in libtorch extraction from wheel - #184336

Closed
tinglvv wants to merge 10 commits into
mainfrom
tingl/fix-libtorch-extract
Closed

tinglvv wants to merge 10 commits into
mainfrom
tingl/fix-libtorch-extract

Conversation

@tinglvv

@tinglvv tinglvv commented May 19, 2026 •

Copy link
Copy Markdown
Collaborator

PR #174753 switched libtorch packaging from a dedicated CMake build to extracting from the pre-built wheels. This PR restores the old libtorch behavior that was changed in the extraction script.

  1. RPATH. Wheel .so files carry RPATHs relative to pip's site-packages layout ($ORIGIN/../../nvidia/*/lib), which doesn't exist in the libtorch tree, giving errors like libnvshmem_host.so.3 => not found. fix_rpath() rewrites every .so in libtorch/lib to $ORIGIN via patchelf. --force-rpath emits DT_RPATH (not DT_RUNPATH), so resolution is transitive and not overridable by LD_LIBRARY_PATH.

  2. Bundled CUDA deps. The small CUDA wheel omits NVIDIA runtime libs that shared-with-deps should ship. bundle_cuda_deps() walks NEEDED transitively from the torch libs and copies any soname found under /usr/local/cuda/lib64 or /usr/local/cuda/extras/CUPTI/lib64 into lib/. Only those dirs are searched, so system libs and the driver stub stay external. Linux CUDA shared-with-deps only.

Both need patchelf and /usr/local/cuda, so the extract job moves from python:3.11 to pytorch/manylinux2_28-builder:; the matrix threads container_image / container_image_tag_prefix through, and artifact paths mov
to github.workspace.

Test plan:
smoke_test_extract_libtorch.py extracts the produced zip and fully dlopens libtorch.so, so a missing or mis-rpath'd dep fails the job.

Fixes #183971

Created with Assistance from Claude

@pytorch-bot

pytorch-bot Bot commented May 19, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/184336

Note: Links to docs will display an error until the docs builds have been completed.

❌ You can merge normally! (2 Unrelated Failures), 16 Unclassified Failures

As of commit 10a9b57 with merge base 4e22359 (image):

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

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.

@pytorch-bot pytorch-bot Bot added the release notes: releng release notes category label May 19, 2026
@tinglvv
tinglvv force-pushed the tingl/fix-libtorch-extract branch from 01f4272 to 343e998 Compare May 19, 2026 15:24
@tinglvv
tinglvv marked this pull request as ready for review May 19, 2026 15:29
@tinglvv
tinglvv requested a review from a team as a code owner May 19, 2026 15:29
@tinglvv
tinglvv requested a review from malfet May 19, 2026 15:30
@tinglvv
tinglvv force-pushed the tingl/fix-libtorch-extract branch from 343e998 to 3c8871a Compare May 19, 2026 15:56

@nWEIdia nWEIdia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Asked a question.
Has libtorch CI been triggered?

@jbschlosser jbschlosser added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 19, 2026
@tinglvv

tinglvv commented May 19, 2026

Copy link
Copy Markdown
Collaborator Author

Asked a question. Has libtorch CI been triggered?

I'm wondering the same that why the original error was not caught in the CI. Then it appears we don't have a CI that will test the extracted linux libtorch binary. A follow-up to add a libtorch smoke test on Linux would be valuable.

@tinglvv tinglvv changed the title Bundle NVIDIA deps and fix RPATH in libtorch extraction from wheel fix RPATH in libtorch extraction from wheel May 21, 2026

@malfet malfet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall LGTM, but let's not add the test script which is not invoked by anyone.

Instead it would be nice to actually test that one can link hellowolrd application against libtorch

@atalman

atalman commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

@tinglvv I believe test is good followup PR, we can add it to smoke test to validate libtorch builds this way during release/nightly validation

@tinglvv
tinglvv force-pushed the tingl/fix-libtorch-extract branch from bf7494a to 9ece764 Compare June 23, 2026 20:41
@tinglvv tinglvv added the ciflow/binaries Trigger all binary build and upload jobs on the PR label Jun 24, 2026
@tinglvv
tinglvv force-pushed the tingl/fix-libtorch-extract branch from 2e78a38 to 8f7fb87 Compare June 29, 2026 18:22
@huydhn

huydhn commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

There are some recent change to the binary build workflow to run on OSDC k8s runners. Please help rebase your PR to get the latest change there. I did make a tweak with runner_temp as the folder is a bit different on the new runners

tinglvv added 3 commits July 29, 2026 11:57
The wheel packages set RPATH relative to pip's site-packages layout
(e.g. $ORIGIN/../../nvidia/nvshmem/lib). After extraction, libtorch
libraries live in a flat lib/ directory, so those RPATHs are wrong.

fix_rpath() rewrites all .so RPATHs to $ORIGIN using patchelf, which
is available in the manylinux2_28-builder container. Raises on any
patchelf failure rather than silently continuing with broken libraries.

Authored by Claude.
The patchelf-based RPATH fix requires running inside a manylinux2_28-builder
container where patchelf is available. Propagate container_image and
container_image_tag_prefix from source wheel configs into the libtorch
extraction matrix, and add a container: directive to the extraction job.

Regenerated generated-linux-binary-manywheel-nightly.yml from the template.

Authored by Claude.
smoke_test_extract_libtorch.py covers the end-to-end extraction pipeline
(find_wheel, extract, copy, zip) using a fake wheel, and fix_rpath unit
tests (platform guard, patchelf invocation on .so and versioned .so files,
non-.so filtering, missing patchelf, patchelf failure, and an integration
test with a real compiler when available). Run in CI before the extraction
step.

Authored by Claude.
tinglvv and others added 6 commits July 29, 2026 11:57
Consolidate the test file down to a single end-to-end extraction test
that exercises the full pipeline (find wheel -> unzip -> copy libs/headers/cmake
-> write metadata -> zip). Remove the separate TestFixRpath class and
unit tests for individual helpers (compute_zip_prefix, find_wheel error
handling) -- those were testing internals rather than the extraction flow.

Also fix the compute_zip_prefix calls to pass the new required `arch`
argument added in a prior commit.

Test Plan:

```
cd .ci/libtorch && python3 -m unittest smoke_test_extract_libtorch -v
```

Authored with AI assistance.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
pytest is not available in the manylinux2_28-builder container used by
the libtorch extraction CI job. The smoke test already uses the stdlib
unittest module, so switch the invocation to python3 -m unittest discover
which requires no extra dependencies.

Test Plan:

```
python3 -m unittest discover -s .ci/libtorch -p smoke_test_extract_libtorch.py -v
# Ran 1 test in 0.060s OK
```

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
… test

This branch adds a container (manylinux2_28-builder) to libtorch-extract
so patchelf is available for fix_rpath. On main the job runs directly on
the runner where $RUNNER_TEMP is accessible, but inside a Docker
container $RUNNER_TEMP is not bind-mounted — only $GITHUB_WORKSPACE is
guaranteed to be mounted. Switch all four path references (download-
artifact, wheel-dir, output-dir, upload-artifact) to $GITHUB_WORKSPACE.

Also replaces the pre-extraction unittest step with a post-extraction
smoke test that runs against the real libtorch zip and verifies:
- All .so files have $ORIGIN rpath (checked via patchelf)
- libtorch.so can be loaded (checked via ctypes.CDLL)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
The libtorch-extract job now runs inside the manylinux container, but its
run steps referenced the workspace via the ${{ github.workspace }} context
(and previously ${{ runner.temp }}). In a container job those contexts
evaluate to the host runner path, while the workspace is mounted inside the
container at $GITHUB_WORKSPACE (/__w/<repo>/<repo>).

GitHub translates the host-form path for uses: action inputs, so
download-artifact wrote the wheel to the in-container mount, but the run:
steps got the untranslated host path, which is an empty directory inside the
container. Extraction then failed with "No .whl files found in
.../wheel_artifact". This is why swapping runner.temp for github.workspace
did not help: both are host-path contexts with the same translation gap, and
it only surfaces once the job is containerized (the pre-container job on main
passed because host paths resolved consistently with no container).

The fix references the workspace via the $GITHUB_WORKSPACE env var in the
run steps so they resolve to the same in-container mount the translated
download/upload action paths point at. The uses: action path: inputs keep
the github.workspace context since the runner translates those correctly.

Test Plan:
Regenerated the workflow and confirmed the run steps use $GITHUB_WORKSPACE
while the download/upload actions keep ${{ github.workspace }}:

```
python3 .github/scripts/generate_ci_workflows.py
git diff .github/workflows/generated-linux-binary-manywheel-nightly.yml
```

Full validation requires re-running the containerized libtorch-extract job
in CI, since the path translation is environment-specific.

This change was authored with the assistance of an AI coding agent.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The smoke test previously did ctypes.CDLL(libtorch.so), which fails on CUDA
variants because the thin libtorch does not bundle CUDA runtime libs (cupti,
cudnn, nccl, ...); those come from the environment. That is not the failure
the test is meant to catch.

The test's purpose is to catch extraction bugs where a copied lib cannot
resolve another copied lib because its RPATH was not rewritten to $ORIGIN
(e.g. "libnvshmem_host.so.3 => not found"). Replace the dlopen with an ldd
sweep over each bundled .so that flags a "not found" dependency only when the
soname is itself present in lib/. Dependencies not bundled here are provided
by the environment and are ignored. Crucially, lib/ is no longer placed on
LD_LIBRARY_PATH, so resolution goes through the $ORIGIN RPATH and a broken
rpath actually fails the test rather than being masked.

Test Plan:
```
python3 -c "import ast; ast.parse(open('.ci/libtorch/smoke_test_extract_libtorch.py').read())"
```
Full validation is the containerized libtorch-extract job in CI, which runs
this smoke test against both the cpu and cuda extracted libtorch zips.

This change was authored with the assistance of an AI coding agent.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@tinglvv
tinglvv force-pushed the tingl/fix-libtorch-extract branch 3 times, most recently from ba766a1 to 254d159 Compare July 29, 2026 21:10
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]>
@tinglvv
tinglvv force-pushed the tingl/fix-libtorch-extract branch from 254d159 to 10a9b57 Compare July 29, 2026 21:54
@tinglvv

tinglvv commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorch-bot

pytorch-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

This PR has pending changes requested. Please address the comments and update the PR before merging.

@malfet

malfet commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@claude review this

@claude

claude Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

Claude finished @malfet's task in 47m 46s —— View job


Reviewed — the RPATH fix and dep-bundling approach look sound, but I found one release-reproducibility hole (the extract job pins no docker suffix), a silent-failure path in the new transitive walk, and a --force-rpath behavior change vs. the old libtorch that contradicts the PR description.

Full review: PR #184336

PR Review: #184336

Summary

Adds fix_rpath() (rewrite wheel RPATHs to $ORIGIN) plus bundle_cuda_deps() (transitive DT_NEEDED closure from /usr/local/cuda/lib64) to the libtorch-from-wheel extraction, runs the extract job in the manylinux builder container so patchelf and the CUDA libs are available, and adds a ctypes.CDLL smoke test. The core approach is right, but there are several correctness/infra issues below, plus an unrelated ciflow-glob change that isn't mentioned in the description.


Infrastructure

1. The extract job drops the pinned docker image, breaking release-candidate reproducibility. This is the most significant finding.

.github/templates/linux_binary_build_workflow.yml.j2:546:

image: pytorch/${{ matrix.container_image }}:${{ matrix.container_image_tag_prefix }}

Compare the build job at line 274, which uses both computed values:

image: !{{ docker_registry_host }}pytorch/!{{ first['container_image'] }}:!{{ first['container_image_tag_prefix'] }}!{{ docker_image_suffix }}

The extract job omits docker_registry_host and docker_image_suffix, and doesn't needs: get-docker-tag. Consequences:

  • On a release-candidate tag (v2.10.0-rc1), manywheel-build runs in the .ci/docker-tree-hash-pinned image, but libtorch-extract runs in main's floating cuda13.0 tag. The whole purpose of pin_docker_image (template lines 72–78) is defeated for libtorch.
  • This mattered less before this PR, when the extract job just repacked wheel contents. Now the container's /usr/local/cuda/lib64 contents get physically baked into the shipped tarball (bundle_cuda_deps), so which container runs is release-critical: a floating-tag bump between the wheel build and the extract job means the libtorch tarball ships different cuDNN/NCCL/nvshmem binaries than the wheel that was built alongside it.
  • On ciflow/binaries/<PR> runs, the build job pulls the PR's ECR image while extract pulls Docker Hub — so the extract job never exercises .ci/docker changes under test.

Please plumb docker_registry_host/docker_image_suffix into this job the same way line 274 does (which also means adding get-docker-tag to needs and using owner_if).

Fix this →

2. The new smoke test cannot block publication. libtorch-upload is gated on if: ${{ !cancelled() && ... }} with needs: libtorch-extract (generated workflow lines 1762–1766). Supplying a custom if: removes the implicit success() requirement, and !cancelled() evaluates true when a dependency fails — so libtorch-upload runs even when extraction or the smoke test fails. Combined with if: always() on the upload-artifact step (line 1753), a tarball that fails the smoke test is still uploaded and published to S3.

This is pre-existing structure, but it means the regression test this PR adds is decorative. Either gate the upload on extraction success, or drop if: always() from the artifact upload.

3. Please demonstrate the smoke test is sensitive (negative control). ctypes.CDLL(".../libtorch.so") runs inside the CUDA manylinux builder, where every soname it needs also exists in /usr/local/cuda/lib64. Before trusting this as a regression test for #183971, please confirm it fails when bundle_cuda_deps()/fix_rpath() are skipped. If /usr/local/cuda/lib64 is reachable via the loader in that container (ldconfig cache, LD_LIBRARY_PATH), the test passes regardless of whether bundling worked, which is exactly the "CI stays green but the tarball is broken" failure mode @atalman raised on line 129.


Code Quality

4. _needed() silently swallows patchelf failures — the exact warn-and-continue pattern that was rightly removed from fix_rpath.

.ci/libtorch/extract_libtorch_from_wheel.py:142-146:

def _needed(patchelf: str, so: Path) -> list[str]:
    r = subprocess.run(
        [patchelf, "--print-needed", str(so)], capture_output=True, text=True
    )
    return r.stdout.split() if r.returncode == 0 else []

A non-zero exit returns [], which prunes that library's entire dependency subtree from the bundle. If this happens on libtorch_cuda.so, nothing gets bundled, fix_rpath succeeds, the smoke test may still pass (see #3), and we ship the #183971 tarball again. fix_rpath was correctly changed to raise on patchelf failure (line 127); this function should too.

The if not src: continue at line 167 has the same character — an unresolvable soname is silently accepted. That branch is load-bearing (it's how system libs like libc.so.6 and the libcuda.so.1 driver stub get skipped), so it can't just raise, but it should at minimum print() what it skipped so the CI log records the decision.

Fix this →

5. patchelf-then-strip inverts the old script's ordering. main() runs fix_rpath at line 402, but split_debug_symbols (which calls strip --only-keep-debug, strip --strip-debug, and objcopy --add-gnu-debuglink) doesn't run until line 418. The old flow did the opposite: .ci/manywheel/build_libtorch.sh strips at lines 135–145 and only patchelfs later at lines 296–303. strip/objcopy operating on a patchelf-rewritten ELF is a known source of corruption. Was the reordering deliberate? If not, move fix_rpath/bundle_cuda_deps after split_debug_symbols.

6. Trivial single-use helper. _is_cuda_variant() (lines 138–139) is one line used once, and with_deps (line 399) is a local used once. CLAUDE.md: "Don't make trivial (1-2 LOC) helper functions that are only used once unless it significantly improves code readability." Inline both:

if args.desired_cuda.startswith("cu") and "with-deps" in args.libtorch_variant:
    bundle_cuda_deps(libtorch_dir / "lib")

7. Duplicated shutil.which("patchelf") + conflated error. bundle_cuda_deps (line 154) re-resolves patchelf, and lines 156–159 raise a single FileNotFoundError for two unrelated causes (missing patchelf vs. missing /usr/local/cuda) with a message that doesn't say which. Resolve patchelf once in main() and pass it down, and separate the two failures.


Backward Compatibility

8. --force-rpath is a behavior change vs. the old libtorch, and contradicts the PR description.

Line 120 uses --force-rpath, which writes DT_RPATH. The old script did not:

.ci/manywheel/build_libtorch.sh:296,303

$PATCHELF_BIN --set-rpath '$ORIGIN:$ORIGIN/lib' $sofile
$PATCHELF_BIN --set-rpath '$ORIGIN' $sofile

No ${FORCE_RPATH} — so old libtorch shipped DT_RUNPATH, which LD_LIBRARY_PATH overrides. DT_RPATH takes precedence over LD_LIBRARY_PATH, so with the new tarball a user can no longer point LD_LIBRARY_PATH at their own cuDNN/NCCL build and have it win — they'll silently get the bundled copy.

The PR description still says "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." After the bundle_cuda_deps commit that's no longer what happens, and --force-rpath actively prevents it. Please either drop --force-rpath to match the old DT_RUNPATH semantics, or keep it and update the description to state the new contract (self-contained tarball, bundled libs not overridable). Since libtorch users routinely build against a system CUDA, this is a user-visible change that belongs in the description either way.

Fix this →

9. Tarball size is unmeasured. bundle_cuda_deps copies the full transitive closure — cuDNN 9 (dispatcher + engine sublibs), cuBLAS/cuBLASLt, cuSOLVER, cuSPARSE, cuFFT, NCCL, nvshmem — all unstripped, since split_debug_symbols only touches libtorch_cpu.so. The old tarball bundled only libgomp.so.1 (.ci/manywheel/build_cpu.sh:40-46). Please post the before/after libtorch-cuda13_0-shared-with-deps-release zip size; these are served from download.pytorch.org and a multi-GB jump is worth a deliberate decision rather than a side effect.


Testing

10. The NEEDED-only walk has a dlopen blind spot — please verify the bundle empirically. bundle_cuda_deps resolves only DT_NEEDED, so anything PyTorch or the NVIDIA libs dlopen at runtime is missed. Concretely in-tree: aten/src/ATen/cuda/detail/LazyNVRTC.cpp:78-81 dlopens nvrtc via at::DynamicLibrary, and libnvrtc itself dlopens libnvrtc-builtins.so.* (which is why torch/__init__.py:361 enumerates it explicitly rather than relying on link-time deps). cuDNN 9's engine sublibs are loaded by the dispatcher, not necessarily NEEDED-linked.

Rather than guess: please run ldd over libtorch/lib/*.so in the produced tarball on a clean host (no CUDA installed) and diff the resolved set against torch/lib/ in the corresponding wheel. That's the check that would have caught #183971 and is the one that tells us whether the closure is actually complete.


Code Quality (unrelated change)

11. The ciflow glob narrowing is an unrelated fix with no mention in the description. Three conditions change from refs/tags/ciflow/binaries* to refs/tags/ciflow/binaries/* (template lines 193, 208, 212).

I believe this is correct: the generated workflow triggers on all three of ciflow/binaries/*, ciflow/binaries_libtorch/*, ciflow/binaries_wheel/* (generated lines 17–19), but build-manywheel-images.yml:10-15 and build-almalinux-images.yml:10-15 only trigger on v*-rc* and ciflow/docker/*. So under the old broad glob, a ciflow/binaries_wheel/<PR> tag would enter the "Wait for content-addressed builder image in ECR" step and burn the full 60-minute timeout before failing.

But it's a distinct CI behavior change buried in a PR titled "fix RPATH in libtorch extraction from wheel," reviewers have already approved without it being called out, and it silently changes which builder image binaries_wheel/binaries_libtorch runs use. Please either split it out or add a line to the PR description explaining it.


Recommendation

Request Changes

Blocking: #1 (release-candidate tarballs built in an unpinned container, now that container contents are baked into the artifact), #4 (silent subtree pruning reintroduces the green-CI-broken-tarball failure mode this PR exists to fix), and #8 (--force-rpath is an undocumented user-visible change that contradicts the PR description).

Also needed before merge: #2/#3, since the new smoke test currently neither blocks publication nor has a demonstrated negative control — without those it doesn't function as a regression test for #183971.

Worth noting: the 16 unclassified ROCm manywheel-*-test failures in DrCI are on the wheel test jobs, not libtorch-extract, and this PR's ROCm path only runs fix_rpath (no bundling, since desired_cuda is rocm7.1). They look unrelated, but since linux-binary-manywheel was cancelled rather than completed on the latest commit, I could not confirm any libtorch-extract job ever ran green with these changes. Please get a clean ciflow/binaries_libtorch run before merging.

| Branch: [`tingl/fix-libtorch-extract`](https://github.com/pytorch/pytorch/tree/tingl/fix-libtorch-extract)

@malfet

malfet commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "Lint + binary builds are green"

@malfet

malfet commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Though PR description is stale

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@tinglvv tinglvv changed the title fix RPATH in libtorch extraction from wheel package cuda dependencies in libtorch extraction from wheel Aug 3, 2026
@github-actions
github-actions Bot deleted the tingl/fix-libtorch-extract branch October 28, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries Trigger all binary build and upload jobs on the PR Merged open source release notes: releng release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ldd libtorch_nvshmem.so in 2.12 libtorch results in libnvshmem_host.so.3 => not found

9 participants