Skip to main content

Module custom

Module custom 

Expand description

Types used to define and register custom Fusion operations.

Backend extension crates can use this module without depending directly on burn-ir or coordinating its version with burn-fusion. Metadata and support for opaque, deferred backend extensions.

Metadata callbacks describe outputs with TensorSpec before registration. The generated wrapper assigns tensor IDs and queues an Operation that invokes the inner backend and publishes its output handles. Execution checks output enum variants in all builds and output dtypes and devices in debug builds. Output shapes and ordinary field values are not checked against backend results. Hidden items support macro expansions in downstream crates.

Structs§

CustomOpIr
Custom operation in fusion stream, declaring its inputs, outputs and scalar arguments.
HandleContainer
Keep all tensor handles in one place and ensure that all resources are used optimally.
StreamId
Unique identifier representing the stream on which work is submitted.
TensorId
The tensor unique identifier.
TensorIr
A tensor definition represents a snapshot of a tensor when it was used.
TensorSpec
Shape and element type of a tensor, without access to its data or handle.

Enums§

OperationIr
Describe all tensor operations possible.
ScalarIr
A scalar representation.

Traits§

Operation
General trait to abstract how a single operation is executed.
OperationOutput
Extension trait to extract outputs when registering an operation.