Skip to content

Fix loading nccl 2.28.#11806

Merged
trivialfis merged 2 commits into
dmlc:masterfrom
trivialfis:fix-nccl
Nov 12, 2025
Merged

Fix loading nccl 2.28.#11806
trivialfis merged 2 commits into
dmlc:masterfrom
trivialfis:fix-nccl

Conversation

@trivialfis

@trivialfis trivialfis commented Nov 12, 2025

Copy link
Copy Markdown
Member

Close #11804

The latest nccl pypi package no longer has the __file__ attribute in its modules (it no longer has modules). We will use the __path__ from the namespace instead.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with loading NCCL 2.28, which doesn't have the __file__ attribute. The fix extracts NCCL library path detection into a separate function that handles both the traditional __file__ attribute and the newer __path__ attribute used in NCCL 2.28.

Key changes:

  • Extracted NCCL path detection logic into a new _find_nccl() function
  • Added support for __path__ attribute to handle NCCL 2.28
  • Changed from hardcoded libnccl.so.2 to dynamic discovery of any libnccl.so* file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python-package/xgboost/collective.py Outdated
Comment thread python-package/xgboost/collective.py
@trivialfis

Copy link
Copy Markdown
Member Author

cc @rongou

@trivialfis
trivialfis merged commit 9255b9c into dmlc:master Nov 12, 2025
63 checks passed
@trivialfis
trivialfis deleted the fix-nccl branch November 12, 2025 18:14
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dask worker removal causes crash after training completes

3 participants