Expand description
Backend trait and plugin architecture for NxPU.
Defines the Backend trait that all NPU code emitters implement,
along with supporting types (BackendOptions, BackendOutput,
BackendError) and a BackendRegistry for CLI dispatch.
Structs§
- Backend
Options - Options passed to a backend during compilation.
- Backend
Output - The output produced by a backend.
- Backend
Registry - Registry of available backends, used for CLI
--targetdispatch. - Buffer
Allocation - A buffer allocation for a single tensor.
- Constant
Tensor - Contents for one tensor, supplied by the caller rather than by the kernel.
- Diagnostic
- A non-fatal diagnostic message from a backend.
- IrDump
Backend - Built-in backend that dumps the IR as text using
nxpu_ir::dump_module. - Memory
Plan - The result of memory planning: buffer assignments and peak usage.
- Output
File - A single output file.
- PerChannel
Param - Per-channel quantization parameters for a weight tensor.
- Quant
Param - A per-tensor quantization parameter entry.
- Tensor
Id - A unique identifier for a tensor in the memory plan.
- Tiling
Plan Info - A tiling plan passed through to backends.
- Vectorization
Hint Info - A vectorization hint passed through to backends.
Enums§
- Backend
Error - Errors that can occur during backend compilation.
- Diagnostic
Level - Severity level for diagnostics.
- Output
Content - Content of an output file.
- Performance
Tier - Performance tier for an operator on a specific NPU.
- Precision
- Target precision for NPU compilation.
- Precision
Policy - Policy for choosing precision during compilation.
Traits§
- Backend
- A backend that compiles NxPU IR to target-specific output.
- Operator
Support - Trait describing which operators an NPU supports and at what performance tier.
Functions§
- validate_
patterns - Validate a set of operator patterns against an
OperatorSupportimplementation.