Skip to content

Conversation

@charleysaintNV
Copy link

@charleysaintNV charleysaintNV commented Dec 4, 2025

This MR adds support for multiple architectures and multiple versions of a toolchain. Using the redis_json you can create multiple versions of a toolchain:

cuda.redist_json(
    name = "cuda_13_0_2",
    version = "13.0.2",
    platforms = [
        "linux-x86_64",
        "linux-sbsa",
    ],
)
cuda.redist_json(
    name = "cuda_13_0_0",
    version = "13.0.0",
    platforms = [
        "linux-x86_64",
        "linux-sbsa",
    ],
)
cuda.redist_json(
    name = "cuda_12_8_0",
    version = "12.8.0",
    platforms = [
        "linux-x86_64",
        "linux-sbsa",
    ],
)

cuda.toolkit(name = "cuda")
use_repo(cuda,"cuda")

then using a set of flags in .bazelrc you can control which version of the toolchain to use in a given config:

build --@rules_cuda//cuda:exec_platform="linux-x86_64"
build --@rules_cuda//cuda:target_platform="linux-x86_64"
build --@rules_cuda//cuda:version="13.0.0"

Copy link

@steple steple left a comment

Choose a reason for hiding this comment

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

Thanks for adding this, I think this will be very useful.

@charleysaintNV
Copy link
Author

pushed a new commit with the versions stuff moved around and all in one place at least and I changed the name of the nvcc_platform and runtime_platform to exec and target

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.

4 participants