Skip to content

Use NCCL wheels from PyPI for CUDA 12 builds#827

Merged
rapids-bot[bot] merged 2 commits intorapidsai:branch-25.06from
divyegala:nccl-wheels
Apr 22, 2025
Merged

Use NCCL wheels from PyPI for CUDA 12 builds#827
rapids-bot[bot] merged 2 commits intorapidsai:branch-25.06from
divyegala:nccl-wheels

Conversation

@divyegala
Copy link
Copy Markdown
Member

@divyegala divyegala commented Apr 16, 2025

Reference PR in RAFT rapidsai/raft#2629.

The size of libcuvs-cu12 wheel goes down from about 1.2G to 854M.

@divyegala divyegala added feature request New feature or request non-breaking Introduces a non-breaking change labels Apr 16, 2025
@divyegala divyegala self-assigned this Apr 16, 2025
@divyegala divyegala requested review from a team as code owners April 16, 2025 22:36
@divyegala divyegala requested a review from AyodeAwe April 16, 2025 22:36
@divyegala
Copy link
Copy Markdown
Member Author

Before this PR:

checking 'libcuvs_cu12-25.6.0a35-py3-none-manylinux_2_28_x86_64.whl'
----- package inspection summary -----
file size
  * compressed size: 1.101G
  * uncompressed size: 1.585G
  * compression space saving: 30.5%
contents
  * directories: 120
  * files: 1629 (4 compiled)
size by extension
  * .so - 1.223G (77.2%)
  * .2 - 0.349G (22.0%)
  * .h - 6.112M (0.4%)
  * .cuh - 3.146M (0.2%)
  * no-extension - 1.318M (0.1%)
  * .inl - 0.819M (0.1%)
  * .hpp - 0.713M (0.0%)
  * .0 - 0.242M (0.0%)
  * .cmake - 95.912K (0.0%)
  * .md - 8.273K (0.0%)
  * .py - 5.413K (0.0%)
  * .txt - 34.0B (0.0%)
largest files
  * (1.222G) libcuvs/lib64/libcuvs.so
  * (0.349G) libcuvs_cu12.libs/libnccl-960d9476.so.2.26.2
  * (1.284M) libcuvs/lib64/libcuvs_c.so
  * (0.259M) libcuvs/include/rapids/libcudacxx/cuda/std/__atomic/functions/cuda_ptx_generated.h
  * (0.242M) libcuvs_cu12.libs/libgomp-5fc1ad8c.so.1.0.0

@divyegala
Copy link
Copy Markdown
Member Author

After this PR:

----- package inspection summary -----
file size
  * compressed size: 0.8G
  * uncompressed size: 1.2G
  * compression space saving: 32.7%
contents
  * directories: 120
  * files: 1628 (3 compiled)
size by extension
  * .so - 1.2G (99.0%)
  * .h - 6.1M (0.5%)
  * .cuh - 3.1M (0.2%)
  * no-extension - 1.3M (0.1%)
  * .inl - 0.8M (0.1%)
  * .hpp - 0.7M (0.1%)
  * .0 - 0.3M (0.0%)
  * .cmake - 95.9K (0.0%)
  * .md - 8.3K (0.0%)
  * .py - 5.4K (0.0%)
  * .txt - 34.0B (0.0%)
largest files
  * (1.2G) libcuvs/lib64/libcuvs.so
  * (1.3M) libcuvs/lib64/libcuvs_c.so
  * (0.3M) libcuvs_cu12.libs/libgomp-62144d34.so.1.0.0
  * (0.3M) libcuvs/include/rapids/libcudacxx/cuda/std/__atomic/functions/cuda_ptx_generated.h
  * (0.2M) libcuvs_cu12-25.6.0a41.dist-info/RECORD
------------ check results -----------
errors found while checking: 0

@divyegala
Copy link
Copy Markdown
Member Author

Updated rpaths for libcuvs.so installed by libcuvs-cu12 wheel in this PR:

(cuvs_wheel_check) dgala@dgx05:/raid/dgala/cuvs$ ldd /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/libcuvs.so
        linux-vdso.so.1 (0x00007fffe43af000)
        libnccl.so.2 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/nccl/lib/libnccl.so.2 (0x00007f33e0655000)
        libcublas.so.12 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/cublas/lib/libcublas.so.12 (0x00007f33d954a000)
        libcusolver.so.11 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/cusolver/lib/libcusolver.so.11 (0x00007f33cab41000)
        libcusparse.so.12 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/cusparse/lib/libcusparse.so.12 (0x00007f33b373a000)
        libcurand.so.10 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/curand/lib/libcurand.so.10 (0x00007f33aac98000)
        libnvJitLink.so.12 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/nvjitlink/lib/libnvJitLink.so.12 (0x00007f33a51b0000)
        libcublasLt.so.12 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../nvidia/cublas/lib/libcublasLt.so.12 (0x00007f3372ebe000)
        libgomp-5fc1ad8c.so.1.0.0 => /raid/dgala/miniforge3/envs/cuvs_wheel_check/lib/python3.12/site-packages/libcuvs/lib64/../../libcuvs_cu12.libs/libgomp-5fc1ad8c.so.1.0.0 (0x00007f3372c82000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3372c64000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3372c5e000)
        librapids_logger.so => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f33729f0000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f33728a1000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f337287c000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3372857000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3372665000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3445c20000)

Copy link
Copy Markdown
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Approving with a couple suggestions.

Comment thread ci/build_wheel.sh Outdated
fi

RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
if [[ ${RAPIDS_CUDA_MAJOR} == "12" ]]; then
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.

Can this be written as “not 11” if we expect future major versions to behave like 12?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, the way I was thinking this would work with future versions is that we would just remove the if conditional but the logic inside the block would still remain at the top-level scope. I'll rewrite it to "not 11" because the answer to your question is yes.

Comment thread ci/test_wheel_cuvs.sh Outdated
@divyegala
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit 23ba17b into rapidsai:branch-25.06 Apr 22, 2025
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CMake feature request New feature or request non-breaking Introduces a non-breaking change Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants