pub enum NodeKind {
KernelLaunch {
function_name: String,
config: KernelConfig,
fusible: bool,
},
Memcpy {
dir: MemcpyDir,
size_bytes: usize,
},
Memset {
size_bytes: usize,
value: u8,
},
EventRecord,
EventWait,
HostCallback {
label: String,
},
Barrier,
Conditional {
condition_buf: BufferId,
true_branch: Vec<NodeId>,
false_branch: Vec<NodeId>,
},
}Expand description
The operation kind associated with a GraphNode.
Variants§
KernelLaunch
Launches a PTX/CUDA kernel.
Fields
config: KernelConfigGrid/block configuration.
Memcpy
Copies memory between host and device, or device to device.
Memset
Fills a device buffer with a byte pattern.
EventRecord
Records a CUDA event (signals completion of preceding work).
EventWait
Waits for a recorded event before proceeding.
HostCallback
A host-side callback inserted into the stream.
Barrier
A no-op synchronisation barrier (join point for multiple dependency chains).
Conditional
A conditional subgraph fork (CUDA graph conditional node equivalent).
Implementations§
Source§impl NodeKind
impl NodeKind
Sourcepub fn is_compute(&self) -> bool
pub fn is_compute(&self) -> bool
Returns true if this node performs device computation (not just memory movement).
Sourcepub fn is_memory_op(&self) -> bool
pub fn is_memory_op(&self) -> bool
Returns true if this node is a memory transfer.
Sourcepub fn is_fusible(&self) -> bool
pub fn is_fusible(&self) -> bool
Returns true if this kernel is marked as fusible with adjacent element-wise kernels.
Sourcepub fn function_name(&self) -> Option<&str>
pub fn function_name(&self) -> Option<&str>
Returns the function name for kernel launch nodes.