Class CudaGraphExec
Managed wrapper around an executable CUDA graph. 可执行 CUDA graph 的托管封装。
public sealed class CudaGraphExec : IDisposable
- Inheritance
-
CudaGraphExec
- Implements
- Inherited Members
Properties
Flags
Gets graph executable flags when supported by the CUDA runtime. 在 CUDA runtime 支持时获取 graph executable flags。
public ulong Flags { get; }
Property Value
Id
Gets the CUDA graph executable identifier when supported by the loaded CUDA runtime. 在当前 CUDA runtime 支持时获取 CUDA graph executable 标识符。
public uint Id { get; }
Property Value
Methods
Dispose()
Releases the executable graph handle. 释放可执行 graph 句柄。
public void Dispose()
GetNodeEnabled(CudaGraphNode)
Gets whether a node is enabled in this executable graph. 获取 executable graph 中某个节点是否启用。
public bool GetNodeEnabled(CudaGraphNode node)
Parameters
nodeCudaGraphNodeA node token owned by the source graph. 源 graph 拥有的节点 token。
Returns
- bool
True when the node is enabled. 节点启用时返回 true。
Launch(CudaStream)
Launches the executable graph on a CUDA stream. 在 CUDA stream 上启动当前可执行 graph。
public void Launch(CudaStream stream)
Parameters
streamCudaStreamThe stream used for graph launch. 用于 graph 启动的 stream。
SetNodeEnabled(CudaGraphNode, bool)
Sets whether a node is enabled in this executable graph. 设置 executable graph 中某个节点是否启用。
public void SetNodeEnabled(CudaGraphNode node, bool enabled)
Parameters
nodeCudaGraphNodeA node token owned by the source graph. 源 graph 拥有的节点 token。
enabledboolWhether the node should be enabled. 节点是否启用。
Upload(CudaStream)
Uploads this executable graph to a CUDA stream before launch. 在 launch 前将当前可执行 graph 上传到 CUDA stream。
public void Upload(CudaStream stream)
Parameters
streamCudaStreamThe stream used for graph upload. 用于 graph upload 的 stream。