TensorPlay
API symbolscuda
Copy
View MarkdownDownload .md

tensorplay.cuda.graphs.graph

tensorplay.cuda.graphs.graph(cuda_graph, pool=None, stream=None, capture_error_mode='global')[source]

Context-manager that captures CUDA work into a tensorplay.cuda.CUDAGraph.

Parameters:
  • cuda_graph (CUDAGraph) – the graph object to capture into.

  • pool – unsupported (each capture gets its own private memory pool).

  • stream (Stream, optional) – unsupported; capture always runs on the dedicated side stream exposed by the runtime.

  • capture_error_mode (str, optional) – "global" (default) makes any unsafe CUDA call anywhere in the process fail the capture. "thread_local" and "relaxed" are rejected because the native binding always captures in global mode.

Ask DeepWiki