Skip to content

Conversation

@shwina
Copy link
Collaborator

@shwina shwina commented Dec 4, 2025

This PR introduces "multi-CUDA" wheels builds, exactly similar to the ones we build for CCCL, as described here.

Instead of shipping multiple packages (pynvbench-cu12, pynvbench-cu13); we ship a single one (pynvbench) that contains both CUDA 12 and 13 binaries (bindings). The resulting wheel size is just ~2.2MB, so this is not a problem. At runtime, depending on the available CUDA version, the appropriate binary is loaded.

At install time, we still need the user to specify which CUDA major version to install for - because the version of required dependencies (nvidia-cuda-cupti-cu12) depend on the CUDA major version. This specification of the CUDA version is done using "extras":

pip install pynvbench[cu12]  # or cu13

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 4, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test 1ab0a2e

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test 4b5fb32

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test a020600

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test 18ecf11

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test b62956b

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test edd31c7

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test d178a08

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test fd2de8c

This reverts commit edd31c7.
@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test 1e2ef0f

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test d54f264

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test 13cb606

@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test 9af979d

This reverts commit 13cb606.
@shwina
Copy link
Collaborator Author

shwina commented Dec 4, 2025

/ok to test ec3615b


[project.optional-dependencies]
# CUDA 12.x dependencies
cu12 = ["cuda-bindings>=12.0.0,<13.0.0", "nvidia-cuda-cupti-cu12"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remove the cuda-bindings dependency as it's just used as a proxy for the CUDA major version right now.

Copy link
Collaborator

@alliepiper alliepiper left a comment

Choose a reason for hiding this comment

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

CMake / infra side look good to me

CPMAddPackage("gh:pybind/pybind11@3.0.0")

# Determine CUDA major version for directory structure
string(REGEX MATCH "^([0-9]+)" CUDA_VERSION_MAJOR "${CUDAToolkit_VERSION}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: CUDAToolkit_VERSION_MAJOR should already be defined as part of CUDAToolkit.

Comment on lines +56 to +62
if [[ "$(uname -m)" == "aarch64" ]]; then
readonly cuda12_image=rapidsai/ci-wheel:${devcontainer_version}-cuda${cuda12_version}-${devcontainer_distro}-py${py_version}-arm64
readonly cuda13_image=rapidsai/ci-wheel:${devcontainer_version}-cuda${cuda13_version}-${devcontainer_distro}-py${py_version}-arm64
else
readonly cuda12_image=rapidsai/ci-wheel:${devcontainer_version}-cuda${cuda12_version}-${devcontainer_distro}-py${py_version}
readonly cuda13_image=rapidsai/ci-wheel:${devcontainer_version}-cuda${cuda13_version}-${devcontainer_distro}-py${py_version}
fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Perhaps introduce readonly host_arch_suffix to set to -arm64 or leave empty` and then image names could be set unconditionally, and arch names would only need to be changed in one place:

readonly cuda12_image=rapidsai/ci-wheel:${devcontainer_version}-cuda${cuda12_version}-${devcontainer_distro}-py${py_version}${arch_suffix}

readonly cuda13_image=rapidsai/ci-wheel:${devcontainer_version}-cuda${cuda13_version}-${devcontainer_distro}-py${py_version}${arch_suffix}

# Test dependencies for CUDA 13
test-cu13 = ["pynvbench[cu13]", "pytest", "cupy-cuda13x", "numba"]

# Generic test dependencies (defaults to CUDA 12)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we default to the latest major version of CTK? Is there a reason not to default to using cu13?

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.

3 participants