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§
- Custom
OpIr - Custom operation in fusion stream, declaring its inputs, outputs and scalar arguments.
- Handle
Container - Keep all tensor handles in one place and ensure that all resources are used optimally.
- Stream
Id - Unique identifier representing the stream on which work is submitted.
- Tensor
Id - The tensor unique identifier.
- Tensor
Ir - A tensor definition represents a snapshot of a tensor when it was used.
- Tensor
Spec - Shape and element type of a tensor, without access to its data or handle.
Enums§
- Operation
Ir - Describe all tensor operations possible.
- Scalar
Ir - A scalar representation.
Traits§
- Operation
- General trait to abstract how a single operation is executed.
- Operation
Output - Extension trait to extract outputs when registering an operation.