bazel-contrib / bazel-contrib/rules_cuda

Move runtime to be inside the toolchain

Open
#299 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
122
Forks
73
Avg merge
7h 34m
Merged PRs (30d)
7

Description

I am trying to use `rules_cuda` with a hermetic toolchain (e.g. my cuda stuff is not from the system but from some external workspace, whose BUILD file I am currently writing manually based on the prior art in this repo). Among other issues which are so far easily locally patched out I am wondering why the runtime is a flag instead of part of the toolchain. I think static/dynamic should be a target setting and let toolchain selection decide whether we are using the dynamic or static runtime. Then pass `--@rules_cuda//:runtime_static` or something to switch to static. (This means we would register 2 toolchains instead of 1).

Without this it is a pain to support multiple toolchains / cuda versions because selecting the cuda version will also always require passing a secondary flag to pick a runtime for it.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by tracing how runtime selection and CUDA toolchain registration are currently represented in rules_cuda, then compare the manual external-workspace BUILD setup described in the report. Done means toolchain selection chooses the static or dynamic runtime without a separate runtime flag and supports multiple CUDA versions.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.