Class MetalExecutionGraph
- Namespace
- DotCompute.Backends.Metal.Execution.Types
- Assembly
- DotCompute.Backends.Metal.dll
Directed acyclic graph (DAG) representing Metal command execution dependencies.
public sealed class MetalExecutionGraph
- Inheritance
-
MetalExecutionGraph
- Inherited Members
Remarks
Enables automatic parallelization and optimization of command sequences with proper dependency tracking and synchronization.
Constructors
MetalExecutionGraph()
public MetalExecutionGraph()
Properties
CreatedAt
Gets when this graph was created.
public DateTimeOffset CreatedAt { get; }
Property Value
Levels
Gets the topologically sorted execution levels.
public IList<MetalExecutionLevel> Levels { get; }
Property Value
Nodes
Gets the execution nodes in the graph.
public IList<MetalExecutionNode> Nodes { get; }
Property Value
TotalNodes
Gets the total number of nodes in the graph.
public int TotalNodes { get; }
Property Value
Methods
AddNode(MetalExecutionNode)
Adds a node to the execution graph.
public void AddNode(MetalExecutionNode node)
Parameters
nodeMetalExecutionNode
BuildExecutionPlan()
Builds an execution plan from the graph by sorting nodes into parallel-executable levels.
public MetalExecutionGraph BuildExecutionPlan()
Returns
BuildLevels()
Builds execution levels from nodes using topological sort.
public void BuildLevels()