Skip to content

[cherry-pick][release/2.13] NCCL ldconfig symlink fix + atomic symlink#4403

Closed
apbose wants to merge 3 commits into
release/2.13from
cherrypick_nccl_ldfix
Closed

[cherry-pick][release/2.13] NCCL ldconfig symlink fix + atomic symlink#4403
apbose wants to merge 3 commits into
release/2.13from
cherrypick_nccl_ldfix

Conversation

@apbose

@apbose apbose commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Cherry-pick of the last two commits from abose/release_2.12_mdtrt_ld_library_fix onto release/2.13.

Both applied cleanly (release/2.13's _nccl_utils.py was at the same base as release/2.12); the resulting _nccl_utils.py is byte-identical to the source branch's final version.

Commits:

  1. c4fce46b3 setup_nccl_for_torch_tensorrt change — replaces the old LD_LIBRARY_PATH + ctypes preload approach with creating a libnccl.so symlink in a system libdir that ld.so already searches (Debian/Ubuntu multiarch, RHEL lib64, or /usr/lib fallback via new helper _sys_libdir_on_ldso_path()), then ldconfig. Removes check_nccl_library_path() and its two tests, and trims the warning in check_nccl_engine_requirements().
  2. 55b3ea7d8 atomic symlink — makes the symlink swap race-safe for multi-process/distributed runs: symlink to a unique per-pid temp name then os.replace onto the target, with temp cleanup and "another rank already produced the correct symlink" handling.

Files: py/torch_tensorrt/distributed/_nccl_utils.py, tests/py/dynamo/distributed/test_native_nccl.py

🤖 Generated with Claude Code

@meta-cla meta-cla Bot added the cla signed label Jul 14, 2026
@github-actions github-actions Bot added component: tests Issues re: Tests component: api [Python] Issues re: Python API labels Jul 14, 2026
@github-actions
github-actions Bot requested a review from zewenli98 July 14, 2026 16:46
@apbose apbose added the Force All Tests[L0+L1+L2] For run all the L0, L1, L2 tests label Jul 14, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@apbose

apbose commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

This was incorrect. Closing in favor of #4408

@apbose apbose closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: tests Issues re: Tests Force All Tests[L0+L1+L2] For run all the L0, L1, L2 tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant