Skip to content

feat: add CUDA graph capture modes - #254

Open
honeyspoon wants to merge 1 commit into
NVlabs:mainfrom
honeyspoon:feat/graph-capture-modes
Open

feat: add CUDA graph capture modes#254
honeyspoon wants to merge 1 commit into
NVlabs:mainfrom
honeyspoon:feat/graph-capture-modes

Conversation

@honeyspoon

Copy link
Copy Markdown

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 CaptureMode from 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 -- --check
  • cargo check -p cuda-async --all-targets
  • cargo test -p cuda-async --test cuda_graph --no-run
  • cargo test -p cuda-async --doc
  • full workspace Clippy, compile-only, and CPU suites passed before splitting the independent changes

Signed-off-by: abder <bobmatt911@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

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.

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.

1 participant