Expand description
§Common ZSpace Utilities for Ruda
This is a new/experimental module.
The goal will be to unify:
- shape/stride construction/validation.
- stride map view transformations.
- common Shape types.
- common Shape/Size/Reshape utility traits.
The intention is to publish this as a stand-alone zspace module,
with no direct tie to ruda; once it is more polished.
Modules§
- dtype
- Tensor data type.
- errors
- Common Ruda Errors
- indexing
- Indexing Utilities
- metadata
- primitive
- quantization
- Quantization data representation.
- shape
- Tensor shape definition.
- slice
- Tensor slice utilities.
- spatial
- striding
- Stride Utilities
Macros§
- s
- Slice argument constructor for tensor indexing.
- shape
- smallvec
- Creates a
SmallVeccontaining the arguments. - strides
Structs§
- Block
Size - Copyable block size, specialized version of
SmallVec. - Float
Info - Numerical precision properties for a floating-point dtype.
- Metadata
- QParam
Tensor - A quantization parameter tensor descriptor.
- QParams
- The quantization tensor data parameters.
- Quant
Scheme - Describes a quantization scheme/configuration.
- Shape
- Shape of a tensor.
- Slice
- A slice specification for a single tensor dimension.
- Slice
Iter - Defines an
Iteratorover aSlice. - Small
Vec - A
Vec-like container that can store a small number of elements inline. - Strides
Enums§
- Bool
Store - Data type used to store boolean values.
- DType
- Expression
Error - Common Expression Error.
- FloatD
Type - IntD
Type - Metadata
Error - Error that can occur when attempting to modify shapes.
- Quant
Acc - The precision of accumulating elements.
- Quant
Level - Level or granularity of quantization.
- Quant
Mode - Strategy used to quantize values.
- Quant
Param - Quantization floating-point precision.
- Quant
Propagation - Specify if the output of an operation is quantized using the scheme of the input or returned unquantized.
- Quant
Store - Data type used to stored quantized values.
- Quant
Value - Data type used to represent quantized values.
- Reshape
Action - The action to take for a reshape operation.
- Reshape
Analysis - The reshape kind.
Constants§
- QPARAM_
ALIGN - Alignment (in bytes) for quantization parameters in serialized tensor data.
Traits§
- QTensor
Primitive - Quantized tensor primitive.
- Slice
Arg - Trait for slice arguments that can be converted into an array of slices.
This allows the
slicemethod to accept both single slices (froms![..]) and arrays of slices (froms![.., ..]or[0..5, 1..3]). - Slice
Ops - Slice-related ops on
Shape - Tensor
Metadata - Tensor metadata trait for tensor primitive.
Functions§
- broadcast_
strides - Calculate the new strides given added batch dimensions.
- calculate_
matmul_ output - Compute the output shape for matrix multiplication with broadcasting support.
- contiguous_
strides - Computes the strides for a contiguous tensor with the given shape.
- is_
contiguous - Check if the current tensor is contiguous.
- pack_
i8s_ to_ u32s - Pack signed 8-bit integer values into a sequence of unsigned 32-bit integers.
- params_
shape - Calculate the shape of the quantization parameters for a given tensor and level
- reshape_
action - Returns the proper action to take when reshaping a tensor.
- reshape_
analysis - Returns the analysis of a reshape operation.
- split_
strides - Calculate the new strides given added split dimensions.
Type Aliases§
- BoolD
Type - Boolean dtype.