Skip to main content

Module compute_graph

Module compute_graph 

Source
Expand description

GPU compute graph — a typed, topologically-ordered execution planner.

Models the task graph used internally by modern GPU driver stacks (e.g. DirectX 12 command lists, Vulkan render graphs, WebGPU compute passes).

§Node types

VariantMeaning
NodeKind::KernelDispatch a compute shader / kernel.
NodeKind::CopyTransfer data between buffers (DMA-style).
NodeKind::BarrierMemory / execution barrier between stages.

§Workflow

  1. Create a ComputeGraph.
  2. Add nodes via ComputeGraph::add_node.
  3. Add resource bindings via ComputeGraph::bind_resource.
  4. Add edges via ComputeGraph::add_edge.
  5. Call ComputeGraph::execution_order to obtain a valid ordering.
  6. Optionally call ComputeGraph::validate to check for binding issues.

Structs§

ComputeGraph
Directed acyclic graph of compute nodes with resource binding management.
ExecutionPlan
The result of topological ordering: an ordered list of node IDs.
GraphNode
A single node in the compute graph.
PipelineStageFlags
Bit flags representing pipeline stages for barrier nodes.
ResourceBinding
A named resource bound to a specific node.

Enums§

GraphError
Errors produced by the compute graph.
NodeKind
The functional category of a compute graph node.
ResourceAccess
Read / write access mode for a resource binding.