Skip to main content

Crate nxpu_backend_core

Crate nxpu_backend_core 

Source
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§

BackendOptions
Options passed to a backend during compilation.
BackendOutput
The output produced by a backend.
BackendRegistry
Registry of available backends, used for CLI --target dispatch.
BufferAllocation
A buffer allocation for a single tensor.
ConstantTensor
Contents for one tensor, supplied by the caller rather than by the kernel.
Diagnostic
A non-fatal diagnostic message from a backend.
IrDumpBackend
Built-in backend that dumps the IR as text using nxpu_ir::dump_module.
MemoryPlan
The result of memory planning: buffer assignments and peak usage.
OutputFile
A single output file.
PerChannelParam
Per-channel quantization parameters for a weight tensor.
QuantParam
A per-tensor quantization parameter entry.
TensorId
A unique identifier for a tensor in the memory plan.
TilingPlanInfo
A tiling plan passed through to backends.
VectorizationHintInfo
A vectorization hint passed through to backends.

Enums§

BackendError
Errors that can occur during backend compilation.
DiagnosticLevel
Severity level for diagnostics.
OutputContent
Content of an output file.
PerformanceTier
Performance tier for an operator on a specific NPU.
Precision
Target precision for NPU compilation.
PrecisionPolicy
Policy for choosing precision during compilation.

Traits§

Backend
A backend that compiles NxPU IR to target-specific output.
OperatorSupport
Trait describing which operators an NPU supports and at what performance tier.

Functions§

validate_patterns
Validate a set of operator patterns against an OperatorSupport implementation.