Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CUDA math wheels #2415

Merged

Conversation

KyleFromNVIDIA
Copy link
Contributor

Use CUDA math wheels to reduce wheel size by not statically linking CUDA math libraries.

Contributes to rapidsai/build-planning#35

@KyleFromNVIDIA KyleFromNVIDIA added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 19, 2024
@KyleFromNVIDIA KyleFromNVIDIA requested review from a team as code owners August 19, 2024 18:58
@KyleFromNVIDIA
Copy link
Contributor Author

Comparing 32f3703 to this branch with the pylibraft wheel, Python 3.11, x86_64, CUDA 12...

Old

Build Time: 6m29s
Wheel Size: 784MB
Wheel Contents:

Archive:  pylibraft_cu12-24.10.0a23-cp311-cp311-manylinux_2_28_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-08-08 18:04   pylibraft/
        0  2024-08-08 18:04   pylibraft_cu12-24.10.0a23.dist-info/
        0  2024-08-08 18:04   pylibraft_cu12.libs/
        0  2024-08-08 18:04   pylibraft/cluster/
        0  2024-08-08 18:04   pylibraft/common/
        0  2024-08-08 18:04   pylibraft/distance/
        0  2024-08-08 18:04   pylibraft/matrix/
        0  2024-08-08 18:04   pylibraft/random/
        0  2024-08-08 18:04   pylibraft/neighbors/
        0  2024-08-08 18:04   pylibraft/test/
      986  2024-08-08 18:04   pylibraft/_version.py
      655  2024-08-08 18:04   pylibraft/__init__.py
1197589593  2024-08-08 18:04   pylibraft/libraft.so
       41  2024-08-08 18:04   pylibraft/GIT_COMMIT
       11  2024-08-08 18:04   pylibraft/VERSION
     1763  2024-08-08 18:04   pylibraft/config.py
        0  2024-08-08 18:04   pylibraft/cluster/cpp/
      829  2024-08-08 18:04   pylibraft/cluster/__init__.py
     1050  2024-08-08 18:04   pylibraft/cluster/CMakeLists.txt
    21092  2024-08-08 18:04   pylibraft/cluster/kmeans.pyx
      590  2024-08-08 18:04   pylibraft/cluster/__init__.pxd
   661089  2024-08-08 18:04   pylibraft/cluster/kmeans.cpython-311-x86_64-linux-gnu.so
     3524  2024-08-08 18:04   pylibraft/cluster/cpp/kmeans.pxd
        0  2024-08-08 18:04   pylibraft/cluster/cpp/__init__.py
        0  2024-08-08 18:04   pylibraft/cluster/cpp/__init__.pxd
     1503  2024-08-08 18:04   pylibraft/cluster/cpp/kmeans_types.pxd
        0  2024-08-08 18:04   pylibraft/common/cpp/
     2485  2024-08-08 18:04   pylibraft/common/interruptible.pyx
   515160  2024-08-08 18:04   pylibraft/common/mdspan.cpython-311-x86_64-linux-gnu.so
     1392  2024-08-08 18:04   pylibraft/common/cai_wrapper.py
     7500  2024-08-08 18:04   pylibraft/common/handle.pyx
      872  2024-08-08 18:04   pylibraft/common/__init__.py
    15427  2024-08-08 18:04   pylibraft/common/mdspan.pyx
  1219536  2024-08-08 18:04   pylibraft/common/handle.cpython-311-x86_64-linux-gnu.so
     2641  2024-08-08 18:04   pylibraft/common/cuda.pyx
   823536  2024-08-08 18:04   pylibraft/common/interruptible.cpython-311-x86_64-linux-gnu.so
     5980  2024-08-08 18:04   pylibraft/common/device_ndarray.py
     1262  2024-08-08 18:04   pylibraft/common/interruptible.pxd
     1674  2024-08-08 18:04   pylibraft/common/optional.pxd
     3321  2024-08-08 18:04   pylibraft/common/mdspan.pxd
     2585  2024-08-08 18:04   pylibraft/common/outputs.py
    70840  2024-08-08 18:04   pylibraft/common/cuda.cpython-311-x86_64-linux-gnu.so
     2720  2024-08-08 18:04   pylibraft/common/ai_wrapper.py
     1083  2024-08-08 18:04   pylibraft/common/CMakeLists.txt
     1956  2024-08-08 18:04   pylibraft/common/handle.pxd
     2093  2024-08-08 18:04   pylibraft/common/input_validation.py
      590  2024-08-08 18:04   pylibraft/common/__init__.pxd
      716  2024-08-08 18:04   pylibraft/common/cuda.pxd
        0  2024-08-08 18:04   pylibraft/common/cpp/__init__.py
      935  2024-08-08 18:04   pylibraft/common/cpp/optional.pxd
     3681  2024-08-08 18:04   pylibraft/common/cpp/mdspan.pxd
        0  2024-08-08 18:04   pylibraft/common/cpp/__init__.pxd
      871  2024-08-08 18:04   pylibraft/distance/__init__.py
   548481  2024-08-08 18:04   pylibraft/distance/fused_l2_nn.cpython-311-x86_64-linux-gnu.so
   560969  2024-08-08 18:04   pylibraft/distance/pairwise_distance.cpython-311-x86_64-linux-gnu.so
     8120  2024-08-08 18:04   pylibraft/distance/pairwise_distance.pyx
   556697  2024-08-08 18:04   pylibraft/distance/fused_distance_nn.cpython-311-x86_64-linux-gnu.so
     5696  2024-08-08 18:04   pylibraft/distance/fused_l2_nn.pyx
     2213  2024-08-08 18:04   pylibraft/distance/distance_type.pxd
     1111  2024-08-08 18:04   pylibraft/distance/CMakeLists.txt
      590  2024-08-08 18:04   pylibraft/distance/__init__.pxd
     6107  2024-08-08 18:04   pylibraft/distance/fused_distance_nn.pyx
        0  2024-08-08 18:04   pylibraft/matrix/cpp/
     4402  2024-08-08 18:04   pylibraft/matrix/select_k.pyx
      651  2024-08-08 18:04   pylibraft/matrix/__init__.py
   540457  2024-08-08 18:04   pylibraft/matrix/select_k.cpython-311-x86_64-linux-gnu.so
     1062  2024-08-08 18:04   pylibraft/matrix/CMakeLists.txt
      595  2024-08-08 18:04   pylibraft/matrix/__init__.pxd
     1538  2024-08-08 18:04   pylibraft/matrix/cpp/select_k.pxd
      590  2024-08-08 18:04   pylibraft/matrix/cpp/__init__.py
        0  2024-08-08 18:04   pylibraft/matrix/cpp/__init__.pxd
        0  2024-08-08 18:04   pylibraft/random/cpp/
      656  2024-08-08 18:04   pylibraft/random/__init__.py
     6974  2024-08-08 18:04   pylibraft/random/rmat_rectangular_generator.pyx
     1185  2024-08-08 18:04   pylibraft/random/CMakeLists.txt
   544649  2024-08-08 18:04   pylibraft/random/rmat_rectangular_generator.cpython-311-x86_64-linux-gnu.so
      590  2024-08-08 18:04   pylibraft/random/__init__.pxd
        0  2024-08-08 18:04   pylibraft/random/cpp/__init__.py
     1116  2024-08-08 18:04   pylibraft/random/cpp/rng_state.pxd
        0  2024-08-08 18:04   pylibraft/random/cpp/__init__.pxd
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/
        0  2024-08-08 18:04   pylibraft/neighbors/cpp/
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/
        0  2024-08-08 18:04   pylibraft/neighbors/cagra/
  1371969  2024-08-08 18:04   pylibraft/neighbors/rbc.cpython-311-x86_64-linux-gnu.so
     2198  2024-08-08 18:04   pylibraft/neighbors/common.pyx
      973  2024-08-08 18:04   pylibraft/neighbors/__init__.py
   620225  2024-08-08 18:04   pylibraft/neighbors/refine.cpython-311-x86_64-linux-gnu.so
    16219  2024-08-08 18:04   pylibraft/neighbors/hnsw.pyx
    76689  2024-08-08 18:04   pylibraft/neighbors/common.cpython-311-x86_64-linux-gnu.so
   594313  2024-08-08 18:04   pylibraft/neighbors/brute_force.cpython-311-x86_64-linux-gnu.so
   645385  2024-08-08 18:04   pylibraft/neighbors/hnsw.cpython-311-x86_64-linux-gnu.so
    15032  2024-08-08 18:04   pylibraft/neighbors/refine.pyx
      812  2024-08-08 18:04   pylibraft/neighbors/common.pxd
     1184  2024-08-08 18:04   pylibraft/neighbors/CMakeLists.txt
     9196  2024-08-08 18:04   pylibraft/neighbors/brute_force.pyx
      590  2024-08-08 18:04   pylibraft/neighbors/__init__.pxd
     7682  2024-08-08 18:04   pylibraft/neighbors/rbc.pyx
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/cpp/
    28893  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/ivf_pq.pyx
      848  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/__init__.py
      810  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/ivf_pq.pxd
  1494153  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/ivf_pq.cpython-311-x86_64-linux-gnu.so
     1069  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/CMakeLists.txt
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/__init__.pxd
     6129  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/cpp/c_ivf_pq.pxd
      590  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/cpp/__init__.py
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_pq/cpp/__init__.pxd
      595  2024-08-08 18:04   pylibraft/neighbors/cpp/__init__.py
     3053  2024-08-08 18:04   pylibraft/neighbors/cpp/rbc.pxd
     2789  2024-08-08 18:04   pylibraft/neighbors/cpp/hnsw.pxd
        0  2024-08-08 18:04   pylibraft/neighbors/cpp/__init__.pxd
     2518  2024-08-08 18:04   pylibraft/neighbors/cpp/brute_force.pxd
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/cpp/
      850  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/__init__.py
  1523753  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/ivf_flat.cpython-311-x86_64-linux-gnu.so
    27969  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/ivf_flat.pyx
     1073  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/CMakeLists.txt
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/__init__.pxd
      590  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/cpp/__init__.py
     7056  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/cpp/c_ivf_flat.pxd
        0  2024-08-08 18:04   pylibraft/neighbors/ivf_flat/cpp/__init__.pxd
        0  2024-08-08 18:04   pylibraft/neighbors/cagra/cpp/
  1573793  2024-08-08 18:04   pylibraft/neighbors/cagra/cagra.cpython-311-x86_64-linux-gnu.so
      784  2024-08-08 18:04   pylibraft/neighbors/cagra/__init__.py
     1200  2024-08-08 18:04   pylibraft/neighbors/cagra/cagra.pxd
    30863  2024-08-08 18:04   pylibraft/neighbors/cagra/cagra.pyx
     1068  2024-08-08 18:04   pylibraft/neighbors/cagra/CMakeLists.txt
        0  2024-08-08 18:04   pylibraft/neighbors/cagra/__init__.pxd
      590  2024-08-08 18:04   pylibraft/neighbors/cagra/cpp/__init__.py
     9821  2024-08-08 18:04   pylibraft/neighbors/cagra/cpp/c_cagra.pxd
        0  2024-08-08 18:04   pylibraft/neighbors/cagra/cpp/__init__.pxd
     1262  2024-08-08 18:04   pylibraft/test/test_cai_wrapper.py
     3598  2024-08-08 18:04   pylibraft/test/test_brute_force.py
    14688  2024-08-08 18:04   pylibraft/test/test_ivf_flat.py
     3627  2024-08-08 18:04   pylibraft/test/test_eps_neighborhood.py
     1752  2024-08-08 18:04   pylibraft/test/test_config.py
     2190  2024-08-08 18:04   pylibraft/test/test_fused_distance_argmin.py
     7228  2024-08-08 18:04   pylibraft/test/test_kmeans.py
     3222  2024-08-08 18:04   pylibraft/test/test_hnsw.py
     1167  2024-08-08 18:04   pylibraft/test/ann_utils.py
     1956  2024-08-08 18:04   pylibraft/test/test_fused_l2_argmin.py
      365  2024-08-08 18:04   pylibraft/test/test_version.py
    15849  2024-08-08 18:04   pylibraft/test/test_ivf_pq.py
     3352  2024-08-08 18:04   pylibraft/test/test_random.py
     9078  2024-08-08 18:04   pylibraft/test/test_cagra.py
     2480  2024-08-08 18:04   pylibraft/test/test_distance.py
     7403  2024-08-08 18:04   pylibraft/test/test_refine.py
        0  2024-08-08 18:04   pylibraft/test/__init__py
     2045  2024-08-08 18:04   pylibraft/test/test_device_ndarray.py
     1642  2024-08-08 18:04   pylibraft/test/test_z_interruptible.py
     1439  2024-08-08 18:04   pylibraft/test/test_handle.py
     1873  2024-08-08 18:04   pylibraft/test/test_select_k.py
      929  2024-08-08 18:04   pylibraft/test/test_mdspan_serializer.py
        0  2024-08-08 18:04   pylibraft_cu12-24.10.0a23.dist-info/licenses/
    22198  2024-08-08 18:04   pylibraft_cu12-24.10.0a23.dist-info/METADATA
      118  2024-08-08 18:04   pylibraft_cu12-24.10.0a23.dist-info/WHEEL
    13037  2024-08-08 18:04   pylibraft_cu12-24.10.0a23.dist-info/RECORD
    11348  2024-08-08 18:04   pylibraft_cu12-24.10.0a23.dist-info/licenses/LICENSE
   253289  2024-08-08 18:04   pylibraft_cu12.libs/libgomp-24e2ab19.so.1.0.0
---------                     -------
1212236490                     160 files

New

Build Time: 5m11s
Wheel Size: 453MB
Wheel Contents:

Archive:  pylibraft_cu12-24.10.0a30-cp311-cp311-manylinux_2_28_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-08-19 21:42   pylibraft_cu12-24.10.0a30.dist-info/
        0  2024-08-19 21:42   pylibraft/
        0  2024-08-19 21:42   pylibraft_cu12.libs/
        0  2024-08-19 21:42   pylibraft_cu12-24.10.0a30.dist-info/licenses/
      118  2024-08-19 21:42   pylibraft_cu12-24.10.0a30.dist-info/WHEEL
    13036  2024-08-19 21:42   pylibraft_cu12-24.10.0a30.dist-info/RECORD
    22338  2024-08-19 21:42   pylibraft_cu12-24.10.0a30.dist-info/METADATA
    11348  2024-08-19 21:42   pylibraft_cu12-24.10.0a30.dist-info/licenses/LICENSE
        0  2024-08-19 21:42   pylibraft/distance/
        0  2024-08-19 21:42   pylibraft/common/
        0  2024-08-19 21:42   pylibraft/cluster/
        0  2024-08-19 21:42   pylibraft/test/
        0  2024-08-19 21:42   pylibraft/random/
        0  2024-08-19 21:42   pylibraft/neighbors/
        0  2024-08-19 21:42   pylibraft/matrix/
      655  2024-08-19 21:42   pylibraft/__init__.py
       11  2024-08-19 21:42   pylibraft/VERSION
       41  2024-08-19 21:42   pylibraft/GIT_COMMIT
      986  2024-08-19 21:42   pylibraft/_version.py
661848433  2024-08-19 21:42   pylibraft/libraft.so
     1763  2024-08-19 21:42   pylibraft/config.py
     6107  2024-08-19 21:42   pylibraft/distance/fused_distance_nn.pyx
      871  2024-08-19 21:42   pylibraft/distance/__init__.py
     2213  2024-08-19 21:42   pylibraft/distance/distance_type.pxd
     5696  2024-08-19 21:42   pylibraft/distance/fused_l2_nn.pyx
     1111  2024-08-19 21:42   pylibraft/distance/CMakeLists.txt
   561217  2024-08-19 21:42   pylibraft/distance/pairwise_distance.cpython-311-x86_64-linux-gnu.so
      590  2024-08-19 21:42   pylibraft/distance/__init__.pxd
   548729  2024-08-19 21:42   pylibraft/distance/fused_l2_nn.cpython-311-x86_64-linux-gnu.so
   556945  2024-08-19 21:42   pylibraft/distance/fused_distance_nn.cpython-311-x86_64-linux-gnu.so
     8120  2024-08-19 21:42   pylibraft/distance/pairwise_distance.pyx
        0  2024-08-19 21:42   pylibraft/common/cpp/
      872  2024-08-19 21:42   pylibraft/common/__init__.py
     2641  2024-08-19 21:42   pylibraft/common/cuda.pyx
   823536  2024-08-19 21:42   pylibraft/common/interruptible.cpython-311-x86_64-linux-gnu.so
     1392  2024-08-19 21:42   pylibraft/common/cai_wrapper.py
     1956  2024-08-19 21:42   pylibraft/common/handle.pxd
     1083  2024-08-19 21:42   pylibraft/common/CMakeLists.txt
     2720  2024-08-19 21:42   pylibraft/common/ai_wrapper.py
     2093  2024-08-19 21:42   pylibraft/common/input_validation.py
     1674  2024-08-19 21:42   pylibraft/common/optional.pxd
    70840  2024-08-19 21:42   pylibraft/common/cuda.cpython-311-x86_64-linux-gnu.so
      716  2024-08-19 21:42   pylibraft/common/cuda.pxd
     5980  2024-08-19 21:42   pylibraft/common/device_ndarray.py
     2585  2024-08-19 21:42   pylibraft/common/outputs.py
     3321  2024-08-19 21:42   pylibraft/common/mdspan.pxd
     7500  2024-08-19 21:42   pylibraft/common/handle.pyx
      590  2024-08-19 21:42   pylibraft/common/__init__.pxd
   515160  2024-08-19 21:42   pylibraft/common/mdspan.cpython-311-x86_64-linux-gnu.so
     2485  2024-08-19 21:42   pylibraft/common/interruptible.pyx
    15427  2024-08-19 21:42   pylibraft/common/mdspan.pyx
  1219536  2024-08-19 21:42   pylibraft/common/handle.cpython-311-x86_64-linux-gnu.so
     1262  2024-08-19 21:42   pylibraft/common/interruptible.pxd
        0  2024-08-19 21:42   pylibraft/common/cpp/__init__.py
      935  2024-08-19 21:42   pylibraft/common/cpp/optional.pxd
     3681  2024-08-19 21:42   pylibraft/common/cpp/mdspan.pxd
        0  2024-08-19 21:42   pylibraft/common/cpp/__init__.pxd
        0  2024-08-19 21:42   pylibraft/cluster/cpp/
      829  2024-08-19 21:42   pylibraft/cluster/__init__.py
    21092  2024-08-19 21:42   pylibraft/cluster/kmeans.pyx
     1050  2024-08-19 21:42   pylibraft/cluster/CMakeLists.txt
   661337  2024-08-19 21:42   pylibraft/cluster/kmeans.cpython-311-x86_64-linux-gnu.so
      590  2024-08-19 21:42   pylibraft/cluster/__init__.pxd
        0  2024-08-19 21:42   pylibraft/cluster/cpp/__init__.py
     1503  2024-08-19 21:42   pylibraft/cluster/cpp/kmeans_types.pxd
     3524  2024-08-19 21:42   pylibraft/cluster/cpp/kmeans.pxd
        0  2024-08-19 21:42   pylibraft/cluster/cpp/__init__.pxd
     1873  2024-08-19 21:42   pylibraft/test/test_select_k.py
     3598  2024-08-19 21:42   pylibraft/test/test_brute_force.py
     9078  2024-08-19 21:42   pylibraft/test/test_cagra.py
     2190  2024-08-19 21:42   pylibraft/test/test_fused_distance_argmin.py
     1439  2024-08-19 21:42   pylibraft/test/test_handle.py
     2480  2024-08-19 21:42   pylibraft/test/test_distance.py
     1642  2024-08-19 21:42   pylibraft/test/test_z_interruptible.py
    14688  2024-08-19 21:42   pylibraft/test/test_ivf_flat.py
     1262  2024-08-19 21:42   pylibraft/test/test_cai_wrapper.py
      929  2024-08-19 21:42   pylibraft/test/test_mdspan_serializer.py
     3222  2024-08-19 21:42   pylibraft/test/test_hnsw.py
        0  2024-08-19 21:42   pylibraft/test/__init__py
     2045  2024-08-19 21:42   pylibraft/test/test_device_ndarray.py
     3627  2024-08-19 21:42   pylibraft/test/test_eps_neighborhood.py
     3352  2024-08-19 21:42   pylibraft/test/test_random.py
     7228  2024-08-19 21:42   pylibraft/test/test_kmeans.py
      365  2024-08-19 21:42   pylibraft/test/test_version.py
     1956  2024-08-19 21:42   pylibraft/test/test_fused_l2_argmin.py
     1167  2024-08-19 21:42   pylibraft/test/ann_utils.py
    15849  2024-08-19 21:42   pylibraft/test/test_ivf_pq.py
     7403  2024-08-19 21:42   pylibraft/test/test_refine.py
     1752  2024-08-19 21:42   pylibraft/test/test_config.py
        0  2024-08-19 21:42   pylibraft/random/cpp/
      656  2024-08-19 21:42   pylibraft/random/__init__.py
   544897  2024-08-19 21:42   pylibraft/random/rmat_rectangular_generator.cpython-311-x86_64-linux-gnu.so
     1185  2024-08-19 21:42   pylibraft/random/CMakeLists.txt
     6974  2024-08-19 21:42   pylibraft/random/rmat_rectangular_generator.pyx
      590  2024-08-19 21:42   pylibraft/random/__init__.pxd
        0  2024-08-19 21:42   pylibraft/random/cpp/__init__.py
        0  2024-08-19 21:42   pylibraft/random/cpp/__init__.pxd
     1116  2024-08-19 21:42   pylibraft/random/cpp/rng_state.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/
        0  2024-08-19 21:42   pylibraft/neighbors/cpp/
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/
        0  2024-08-19 21:42   pylibraft/neighbors/cagra/
      973  2024-08-19 21:42   pylibraft/neighbors/__init__.py
     2198  2024-08-19 21:42   pylibraft/neighbors/common.pyx
   645633  2024-08-19 21:42   pylibraft/neighbors/hnsw.cpython-311-x86_64-linux-gnu.so
     1184  2024-08-19 21:42   pylibraft/neighbors/CMakeLists.txt
  1372209  2024-08-19 21:42   pylibraft/neighbors/rbc.cpython-311-x86_64-linux-gnu.so
    16219  2024-08-19 21:42   pylibraft/neighbors/hnsw.pyx
      812  2024-08-19 21:42   pylibraft/neighbors/common.pxd
     9196  2024-08-19 21:42   pylibraft/neighbors/brute_force.pyx
      590  2024-08-19 21:42   pylibraft/neighbors/__init__.pxd
   594561  2024-08-19 21:42   pylibraft/neighbors/brute_force.cpython-311-x86_64-linux-gnu.so
    76937  2024-08-19 21:42   pylibraft/neighbors/common.cpython-311-x86_64-linux-gnu.so
    15032  2024-08-19 21:42   pylibraft/neighbors/refine.pyx
   620465  2024-08-19 21:42   pylibraft/neighbors/refine.cpython-311-x86_64-linux-gnu.so
     7682  2024-08-19 21:42   pylibraft/neighbors/rbc.pyx
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/cpp/
      850  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/__init__.py
     1073  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/CMakeLists.txt
    27969  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/ivf_flat.pyx
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/__init__.pxd
  1524001  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/ivf_flat.cpython-311-x86_64-linux-gnu.so
      590  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/cpp/__init__.py
     7056  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/cpp/c_ivf_flat.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_flat/cpp/__init__.pxd
      595  2024-08-19 21:42   pylibraft/neighbors/cpp/__init__.py
     2518  2024-08-19 21:42   pylibraft/neighbors/cpp/brute_force.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/cpp/__init__.pxd
     2789  2024-08-19 21:42   pylibraft/neighbors/cpp/hnsw.pxd
     3053  2024-08-19 21:42   pylibraft/neighbors/cpp/rbc.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/cpp/
      848  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/__init__.py
      810  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/ivf_pq.pxd
     1069  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/CMakeLists.txt
    28893  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/ivf_pq.pyx
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/__init__.pxd
  1494401  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/ivf_pq.cpython-311-x86_64-linux-gnu.so
      590  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/cpp/__init__.py
     6129  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/cpp/c_ivf_pq.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/ivf_pq/cpp/__init__.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/cagra/cpp/
      784  2024-08-19 21:42   pylibraft/neighbors/cagra/__init__.py
     1200  2024-08-19 21:42   pylibraft/neighbors/cagra/cagra.pxd
     1068  2024-08-19 21:42   pylibraft/neighbors/cagra/CMakeLists.txt
  1574041  2024-08-19 21:42   pylibraft/neighbors/cagra/cagra.cpython-311-x86_64-linux-gnu.so
        0  2024-08-19 21:42   pylibraft/neighbors/cagra/__init__.pxd
    30863  2024-08-19 21:42   pylibraft/neighbors/cagra/cagra.pyx
      590  2024-08-19 21:42   pylibraft/neighbors/cagra/cpp/__init__.py
     9821  2024-08-19 21:42   pylibraft/neighbors/cagra/cpp/c_cagra.pxd
        0  2024-08-19 21:42   pylibraft/neighbors/cagra/cpp/__init__.pxd
        0  2024-08-19 21:42   pylibraft/matrix/cpp/
      651  2024-08-19 21:42   pylibraft/matrix/__init__.py
     1062  2024-08-19 21:42   pylibraft/matrix/CMakeLists.txt
     4402  2024-08-19 21:42   pylibraft/matrix/select_k.pyx
   540705  2024-08-19 21:42   pylibraft/matrix/select_k.cpython-311-x86_64-linux-gnu.so
      595  2024-08-19 21:42   pylibraft/matrix/__init__.pxd
      590  2024-08-19 21:42   pylibraft/matrix/cpp/__init__.py
     1538  2024-08-19 21:42   pylibraft/matrix/cpp/select_k.pxd
        0  2024-08-19 21:42   pylibraft/matrix/cpp/__init__.pxd
   253289  2024-08-19 21:42   pylibraft_cu12.libs/libgomp-24e2ab19.so.1.0.0
---------                     -------
676498925                     160 files

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Left some suggestions for your consideration on the new dependencies.yaml changes. These apply to all of these "Use CUDA math wheels" PRs.

dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Show resolved Hide resolved
@@ -124,7 +128,7 @@ requires = [
"rmm==24.10.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
dependencies-file = "../../dependencies.yaml"
matrix-entry = "cuda_suffixed=true"
matrix-entry = "cuda_suffixed=true;use_cuda_wheels=true"
Copy link
Member

Choose a reason for hiding this comment

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

When we first talked about this idea, I was thinking usa_cuda_wheels should default to false, so that DLFW / pip devcontainers don't even have to think about it.

And then build scripts here in RAPIDS repos that prepare wheels for distribution would opt in to it by passing use_cuda_wheels=true through config settings.

As I type that, I've come around to the idea that that's not the right balance... one change in DLFW + one change in pip devcontainers is preferable to spreading this complexity around every build_wheel*.sh across RAPIDS.

So I'm good with this, but once we merge a PR with this pattern, please do go put up the corresponding changes in RAPIDS DLFW and devcontainers (devcontainers example: rapidsai/devcontainers#365).

Unused matrix selectors are harmless (I think), so use_cuda_wheels=false could be added unconditionally in those builds even if not all repos have matrices using that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, I added a tasklist with this in it to rapidsai/build-planning#35

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One thing I'd like to point out is that devcontainers generates a requirements.txt file, while this dependency set only has pyproject.toml output, so it won't actually get the wheels anyway. Still, I'll submit a PR just in case that ever changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

devcontainers generates a requirements.txt file, while this dependency set only has pyproject.toml output

I think your conclusion that the devcontainers PR isn't strictly necessary and is just defensive is correct. Everything below is for the benefit of others reading along or finding this from search, and doesn't change this PR.


The claim that this having only output_type: pyproject means we don't need to care about it for pip devcontainers isn't true by itself.

The runtime dependencies in the wheel metadata don't strictly have to be correct because in pip devcontainers, the package will be built with pip install --no-deps --no-build-isolation.

(devcontainers code link)

That --no-deps does mean that the runtime dependencies listed in the wheel's metadata don't have to be correct.

So it's output_type: pyproject and the fact that these CUDA wheels are only runtime dependencies that together make this change not disruptive for RAPIDS devcontainers.

HOWEVER... if the project metadata lists any build dependencies that don't already exist in the environment where that pip install runs, that build will fail.

So any list in dependencies.yaml which had only output_type: pyproject which was used to populate wheel build requirements could affect pip devcontainers, because those requirements would need to all be met by the pre-created build environment.

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks, I don't have any other comments.

@KyleFromNVIDIA
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit f1cc0fb into rapidsai:branch-24.10 Aug 22, 2024
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CMake improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants