Table of Contents

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

DateTimeOffset

Levels

Gets the topologically sorted execution levels.

public IList<MetalExecutionLevel> Levels { get; }

Property Value

IList<MetalExecutionLevel>

Nodes

Gets the execution nodes in the graph.

public IList<MetalExecutionNode> Nodes { get; }

Property Value

IList<MetalExecutionNode>

TotalNodes

Gets the total number of nodes in the graph.

public int TotalNodes { get; }

Property Value

int

Methods

AddNode(MetalExecutionNode)

Adds a node to the execution graph.

public void AddNode(MetalExecutionNode node)

Parameters

node MetalExecutionNode

BuildExecutionPlan()

Builds an execution plan from the graph by sorting nodes into parallel-executable levels.

public MetalExecutionGraph BuildExecutionPlan()

Returns

MetalExecutionGraph

BuildLevels()

Builds execution levels from nodes using topological sort.

public void BuildLevels()