feat: add CUDA graph capture modes
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
The original work adds capture modes in cuda-async/src/cuda_graph.rs and exercises them in cuda-async/tests/cuda_graph.rs, but its pull request was closed after the repository moved and the branch conflicts with the new main. Read the "Transplanting a cutile-rs pull request" section in AGENTS.md to replay the work, then resolve those conflicts and run the listed cuda-async checks and tests. Done means the capture modes and GPU-gated tests are integrated in NVIDIA/cuda-rust.
Written by the indexing model from the issue text.
Description
Tracks pull request NVlabs/cutile-rs#254 (https://github.com/NVlabs/cutile-rs/pull/254) by @honeyspoon, opened 2026-09-01: feat: add CUDA graph capture modes. As of 2026-10-07 the branch conflicts with cutile-rs main in: cuda-async/src/cuda_graph.rs, cuda-async/tests/cuda_graph.rs.
@honeyspoon: that repository has moved here and is being archived, so the pull request is closed there, not rejected. If you want to continue the work, please recreate it against NVIDIA/cuda-rust. AGENTS.md in NVIDIA/cuda-rust has a "Transplanting a cutile-rs pull request" section that lets an agent do the replay (it fetches pull/254/head from NVlabs/cutile-rs, keeps your authorship and sign-off, and maps the moved paths).
Original description:
Why
cuda-async always begins stream capture in relaxed mode. Callers that need CUDA to detect interfering work from the current thread or process currently have to bypass the graph API.
What changed
- Add
CaptureMode::{Global, ThreadLocal, Relaxed}. - Add explicit-mode variants for operation and scoped graph capture.
- Re-export
CaptureModefrom the prelude. - Keep existing capture methods unchanged, with relaxed mode as their default.
- Exercise both capture paths with every mode in the GPU-gated graph tests.
This does not change graph instantiation, upload, replay, or ownership behavior.
Validation
cargo fmt --all -- --checkcargo check -p cuda-async --all-targetscargo test -p cuda-async --test cuda_graph --no-runcargo test -p cuda-async --doc- full workspace Clippy, compile-only, and CPU suites passed before splitting the independent changes
- Dominant language
- Rust
- Stars
- 3.8k
- Forks
- 325
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 66
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuda-rust
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NVIDIA/cuda-rust#1568 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: The doc of trait `LoadTileLike` is incorrectMay be free again @akhil9tiet claimed this 7 days ago, and no pull request is open. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
NVIDIA/cuda-rust#1523 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA/cuda-rust#1303 · 1 comment ·
Maintainers usually reply within 2 days
All issues in NVIDIA/cuda-rust
Similar issues
-
good first issue help wanted r-feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
servo/rust-smallvec#792 ·
Maintainers usually reply within 1 day
-
A-Unicode C-bug P-low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
rust-lang/rustfmt#7210 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
area:sim good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bitcoindevkit/bdk#2432 ·
Maintainers usually reply within 3 days