class

ML::Metal::ComputeGraph

Inherits Reference / Object

Constructors

Class methods

debug_encode
debug_encode=(debug_encode : Bool)

Instance methods

add_op(pipeline : ComputePipeline, &block : OpBuilder -> ) : Int32

Add an operation to the graph. Returns its index.

Source
add_op_direct(op : Op) : Int32

Add a pre-built Op directly (used by GraphEncoder)

Source
clear

Clear all operations (reuse the graph object)

Source
compile!

Compile: analyze dependencies, group into waves

Source
encode(cmd : CommandBuffer) : Nil

Encode the compiled graph into a command buffer

Source
encode_sequential(cmd : CommandBuffer) : Nil

Encode sequentially (debug: barrier between every op, no wave optimization)

Source
size

Number of operations in the graph

Source
stats

Compilation stats (available after compile!)

Source

Nested types