Skip to content

Conversation

@tharittk
Copy link
Collaborator

The bug is discovered by @mrava87 when the system is installed with CuPy but without NCCL.

Scenario:
CuPy always comes with cupy.cuda.nccl so checking the import error of cupy.cuda.nccl is not sufficient to verify the existence of NCCL. Under the original code, with CuPy installed without NCCL, the deps.nccl_enabled will be True (as no import error occurs). This will lead to crash import pylops_mpi because it can't find nccl.NCCL_FLOAT32

Fix:
If CuPy is present, this import statement import cupy.cuda.nccl as nccl will not throw an error and we can check the NCCL's existence through this nccl.available flag

@tharittk tharittk marked this pull request as ready for review May 31, 2025 16:35
Copy link
Contributor

@mrava87 mrava87 left a comment

Choose a reason for hiding this comment

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

@tharittk this looks great, I think this should solve the problem that we saw when cupy is installed but nccl is not . I am going to merge this 😄

@mrava87 mrava87 merged commit 3585f36 into PyLops:main Jun 2, 2025
61 checks passed
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.

2 participants