Expand description
Prelude module that re-exports commonly used items.
Re-exports§
pub use super::runtime::*;
Modules§
- parser
- Macros for virtual ISA.
- semantics
- Semantic implementations for VE operations.
- stage
- Vector Engine stage markers and state.
Macros§
- axes
- Macro to define shapes using axis names and sizes.
- i
- Macro for index expressions.
- m
- Macro for mapping expressions.
Structs§
- Aligned
Pair - Pair of aligned tensors ready for contraction (Feed Buffer + TRF Sequencer output).
- Array
Vec - Wrapper around
arrayvec::ArrayVecthat allows initialization with arrays smaller than capacity. - Block
Bounds - Bounds for the padded block removed for a matched term.
- ClipOpF
- Clip cluster operations for f32 (internal, with mode).
- ClipOpI
- Clip cluster operations for i32 (internal, with mode).
- Context
- Device context.
- Contraction
Tensor - Intermediate tensor after contraction (LAT reduce within Packet), before accumulation (accumulator reduce across Time).
- Division
- Result of dividing two factor mappings.
- Division
Term - Information about a single matched term in a division.
- DmTensor
- Tensor stored in data memory.
- DmTensor
View - View of a data memory tensor.
- DmTensor
View Mut - Mutable view of a data memory tensor.
- DmaContext
- Context for a specific DMA engine.
- DpeTensor
- Tensor stored in dot product engine
- FMapping
- Factor mapping expression.
- FpDivOp
- Floating Point Division operation (internal, with mode).
- FpToFxp
- VectorEngine FpToFxp layer configuration.
- FxpOp
- Fxp cluster operations (internal, with mode).
- FxpToFp
- VectorEngine FxpToFp layer configuration.
- HasTensor
- A
Tensorwith scalar typeDand memory layoutMappingis present. - HbmTensor
- Tensor stored in HBM memory.
- HbmTensor
View - View of an HBM tensor.
- HbmTensor
View Mut - Mutable view of an HBM tensor.
- Host
Tensor - Tensor stored in host memory.
- Ident
- Axis identifiers.
- Identity
- Identity expression.
- Index
- Index mapping for tensor operations.
- Logic
OpF - Logic cluster operations for f32 (internal, with mode).
- Logic
OpI - Logic cluster operations for i32 (internal, with mode).
- Modulo
- Modulo expression that represents modulo
SIZEelements. - NoTensor
- No tensor is present.
- Padding
- Add padding to increase an expression’s size.
- Pair
- Pair expression of two expressions.
- Position
Begin - After beginning the pipeline.
- Position
Cast - After the cast engine.
- Position
Collect - After the switch engine’s collect engine (32-byte packet normalized).
- Position
Contraction - After the contraction engine.
- Position
Fetch - After the fetch engine.
- Position
Switch - After the switch engine.
- Position
Transpose - After the transpose engine.
- Position
Vector Final - After the vector engine (vector_final).
- RSorted
Map - A FFI-safe ordered map backed by a sorted
RVec<Tuple2<K, V>>. - RawTensor
- Tensor with scalar type
D. - Relaxed
- Marker for read-accessible division results.
- Resize
- Truncate expression to
SIZEelements. - Span
- Marker for span-division results without padding analysis.
- Stash
- Type-inferred stash marker for compile-time type checking.
- Stash
Operand - Stash operand for Vector Engine operations.
- Stream
Tensor - Tensor streamed through the pipeline.
- Strict
- Marker for analysis-capable division results.
- Stride
- Stride expression that represents one for every
SIZEelements. - Symbol
- Symbol expression that represents a single axis.
- Tensor
- Tensor with scalar type
Dwith axes determined byMapping. - Term
inner / stride % modulo.- Term
Bounds - Per-term compact padding bounds.
- Term
Position - A Term factor with its position (stride) in an FMapping.
- Ternary
Operand - User-facing operand for ternary operations.
Generic over
Mappingto match the target tensor’s mapping from creation time. Ternary operations are only supported for f32 tensors. - TrfTensor
- Tensor stored in the tensor register file.
- TuContext
- Context for a specific tensor unit.
- VeBranch
Operand - Operand with branch validity for multi-operand cases.
- VeTensor
Data - Common tensor data for VE pipeline stages, without context reference. This expects sharing implementation between VectorTensor and VectorTensorPair groups.
- Vector
Init Tensor - VE input after
vector_init(), before choosing the first block. - Vector
Tensor - Unified tensor type for all VE pipeline stages.
- Vector
Tensor Pair - Pair of tensors that manages both groups together.
- VrfTensor
- Tensor stored in the vector register file (VRF).
- bf16
- 16-bit brain floating point type.
- f8
- 8-bit floating point type.
- f8e4m3
- 8-bit floating point type with 4-bit exponent (E4M3).
- i4
- 4-bit signed integer type.
Enums§
- Accumulation
Kind - Contraction mode for accumulation.
- ArgMode
- Arg mode: what operand to use as each argument of the operator.
- Atom
- Atomic mapping expression.
- Binary
ArgMode - Binary arg mode. ModeXY: op(argX, argY) where 0=mainstream, 1=operand0
- Branch
Mode - Branch mode configuration for Vector Engine.
- Clip
Binary OpF32 - Clip binary operations for f32 (user-facing, mode-free).
- Clip
Binary OpI32 - Clip binary operations for i32 (user-facing, mode-free).
- Division
Error - Error during division of mapping expressions.
- Division
Side - Selects which side of a
DivisionTermto operate on. - Dma
- DMA units.
- Factor
- Factor representation of a mapping expression.
- FpBinary
Op - Fp binary operations (user-facing, mode-free).
- FpDiv
Binary Op - FpDiv binary operations (user-facing, mode-free).
- FpMul
Alu - Float cluster Mul ALU selection.
- FpOp
- Fp cluster operations (internal, with mode).
- FpTernary
Op - Fp ternary operations (user-facing, mode-free).
- FpUnary
Op - Fp unary operations (user-facing, mode-free).
- FxpBinary
Op - Fxp cluster binary operations (user-facing, mode-free).
- GroupId
- GroupId: msb 1 bit of branch id.
- Index
Value Error - Error returned when querying ident contributions from an
Index. - Input
Cmp - comparison operations for Vector Engine Branch Unit.
- Input
CmpF32 - f32 comparison operations
- Input
CmpI32 - i32 comparison operations
- Inter
Slice Reduce OpF32 - Inter-slice reduce operations for f32 (VRU).
- Inter
Slice Reduce OpI32 - Inter-slice reduce operations for i32 (VRU).
- Intra
Slice Reduce OpF32 - Intra-Slice Reduce operations for f32.
- Intra
Slice Reduce OpI32 - Intra-Slice Reduce operations for i32.
- Logic
Binary OpF32 - Logic cluster binary operations for f32 (user-facing, mode-free).
- Logic
Binary OpI32 - Logic cluster binary operations for i32 (user-facing, mode-free).
- Mapping
- Mapping expression enum.
- Opt
- A data type that can be either initialized or uninitialized.
- Padding
Kind - Kind of a padding factor.
- RngdAlu
- Renegade ALU units.
- Switch
Config - Configuration for the
switchoperation. - Ternary
ArgMode - Ternary arg mode. ModeXYZ: op(argX, argY, argZ) where 0=mainstream, 1=operand0, 2=operand1
- TrfAddress
- Address in the tensor register file.
- Tu
- Tensor units.
- Unary
ArgMode - Unary arg mode. Mode0: op(mainstream), Mode1: op(operand0)
- Valid
Branch Ids - Branch ID configuration for Vector Engine operations.
- VeOp
- Vector Engine operations (unified enum for runtime storage).
- VeOperand
- Unified operand type for Vector Engine operations.
- VeRhs
- RHS operand for Vector Engine operations.
- VeScalar
Kind - The kind of scalar type supported by Vector Engine.
Traits§
- AtomExt
- Methods for
Atom. - Axis
Name - Marker trait for axis names. Implemented by types generated by
axes!. - Contraction
Cast - Output type for contraction (DPE accumulates in wider type).
- Division
Ext - Methods for
Division<M>. - Division
Mode - Determines the padding kind used for matched-hole markers in division.
- FMapping
Ext - Methods for
FMapping. - Factor
Ext - Methods for
Factor. - Fetch
Cast - Trait for types that can be cast during fetch operations.
- HasAlu
- Trait for ops that provide ALU information.
- HasBinary
Op - Trait for ops that provide binary operation function.
- HasTernary
Op - Trait for ops that provide ternary operation function.
- HasUnary
Op - Trait for ops that provide unary operation function.
- Index
Ext - Methods for
Index. - Into
Group Operand - Trait for converting various types into a group operand.
- Into
Group Ternary Operand - Trait for converting various types into a group ternary operand.
- Into
Operands - Trait for converting various operand types into an ArrayVec.
- Into
Ternary Operands - Trait for converting various operand types into an ArrayVec of TernaryOperand.
- M
- Mapping expression that describes memory layout and computes size for a given shape.
- Mapping
Ext - Methods for
Mapping. - Position
- Marker trait for pipeline position of stream tensors.
- Scalar
- A trait for scalar types.
- Scalar
Bytes - A byte-aligned
Scalarthat can be decoded from its little-endian byte representation. - Stream
Cast - Trait for stream tensors that can be cast to a different scalar type.
- Strict
Division Ext - Methods specific to
Division<Strict>. - Tensor
State - Marker trait that tracks tensor presence at compile time.
- TermExt
- Methods for
Term. - VeOperation
- Common trait for Vector Engine operations.
- VeScalar
- Marker trait for scalar types supported by Vector Engine. Only i32 and f32 are supported.
Functions§
- apply_
branch_ config - Applies branch unit to generate ExecutionId for each element.
- assert_
div - Asserts that dividing
IfromEresults inE2after removing padding.
Type Aliases§
- Accumulation
Tensor - Tensor streamed after the contraction engine.
- Address
- Address.
- Begin
Tensor - Tensor streamed after the beginning.
- Cast
Tensor - Tensor streamed after the cast engine.
- Collect
Tensor - Tensor after collect engine: packet is exactly 32 bytes (one flit).
- Fetch
Tensor - Tensor streamed after the fetch engine.
- Group
Operand - Type alias for group operand in VectorTensorPair operations.
Generic over
Mappingto match the target tensor’s mapping from creation time. - Group
Ternary Operand - Type alias for group ternary operand in VectorTensorPair operations.
- Switch
Tensor - Tensor streamed after the switch engine.
- Transpose
Tensor - Tensor streamed after the transpose engine.
- Vector
Branch Tensor - Tensor after branch unit.
- Vector
Clip Tensor - Tensor after clip operations.
- Vector
Filter Tensor - Tensor after filter operation.
- Vector
Final Tensor - Tensor after the vector engine (after
vector_final()). - Vector
FpDiv Tensor - Tensor after fp division.
- Vector
FpTensor - Tensor after floating-point operations.
- Vector
FpTo FxpTensor - Tensor after f32 to i32 conversion.
- Vector
FxpTensor - Tensor after fixed-point operations.
- Vector
FxpTo FpTensor - Tensor after i32 to f32 conversion.
- Vector
Inter Slice Reduce Tensor - Tensor after inter-slice reduce.
- Vector
Intra Slice Reduce Tensor - Tensor after intra-slice reduce operations.
- Vector
Logic Tensor - Tensor after logic operations.
- Vector
Narrow Tensor - Tensor after narrow layer (split or trim).
- Vector
Widen Tensor - Tensor after widen layer (concat or pad).
Attribute Macros§
- device
- Marks a function as a device entry point for
launch().