pub struct ExecutionPlan {
pub steps: Vec<PlanStep>,
pub num_streams: usize,
pub pool_bytes: usize,
pub kernel_count_original: usize,
pub kernel_count_fused: usize,
pub event_count: usize,
}Expand description
The compiled, optimised execution plan for a ComputeGraph.
Contains an ordered list of PlanSteps that can be submitted to an
executor backend (sequential simulator or real CUDA graph capture).
Fields§
§steps: Vec<PlanStep>Steps in submission order.
num_streams: usizeNumber of distinct CUDA streams used.
pool_bytes: usizeTotal device memory pool size in bytes.
kernel_count_original: usizeNumber of kernel launches (before fusion).
kernel_count_fused: usizeNumber of kernel launches (after fusion).
event_count: usizeNumber of cross-stream event sync pairs.
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn build(graph: &ComputeGraph, max_streams: usize) -> GraphResult<Self>
pub fn build(graph: &ComputeGraph, max_streams: usize) -> GraphResult<Self>
Compiles a ComputeGraph into an ExecutionPlan.
Runs all analysis and optimisation passes in order: topo → liveness → fusion → memory → stream → linearise.
§Parameters
graph— the computation graph to compile.max_streams— upper bound on concurrent CUDA streams.
§Errors
Propagates errors from any analysis or optimisation pass.
Sourcepub fn steps_on(&self, stream: StreamId) -> Vec<&PlanStep>
pub fn steps_on(&self, stream: StreamId) -> Vec<&PlanStep>
Returns all steps assigned to a specific stream, in order.
Sourcepub fn total_steps(&self) -> usize
pub fn total_steps(&self) -> usize
Returns the total number of steps.
Sourcepub fn compute_steps(&self) -> usize
pub fn compute_steps(&self) -> usize
Returns the number of kernel-launch steps (after fusion).
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more