Skip to main content

Crate ruda_tensor

Crate ruda_tensor 

Source
Expand description

This library provides the core types that define how Ruda tensor data is represented, stored, and interpreted.

Re-exports§

pub use backend::*;
pub use shape::*;
pub use slice::*;
pub use indexing::*;

Modules§

apiapi
Public tensor API built on the shared backend contracts and primitives.
backend
Backend trait and required types.
cast
Tensor element casting.
device
distribution
Random value distributions used to initialize and populate tensor data.
element
Traits and helpers for working with element types and conversions.
indexing
Indexing utilities.
ops
primitive
quantization
Quantization data representation.
shape
Shape definition.
slice
Slice utilities.
tensor
Backend tensor primitives and operations.

Macros§

dequant_op_flow
Automatically applies dequantization -> float operation [-> quantization].
dequant_op_quant
Automatically applies dequantization -> float operation -> quantization.
doc_tensor
Convenience macro to link to the ruda-tensor API docs.
make_element
Macro to implement the element trait for a type.

Structs§

Bytes
A buffer similar to Box<[u8]> that supports custom memory alignment and allows trailing uninitialized bytes.
DeviceHandle
TODO: Docs
DistributionSampler
Distribution sampler for random value of a tensor.
StreamId
Unique identifier that can represent a stream based on the current thread id.
TensorData
Data structure for tensors.
Tolerance
The tolerance used to compare to floating point numbers.
bf16
A 16-bit floating point type implementing the bfloat16 format.
f16
A 16-bit floating point type implementing the IEEE 754-2008 standard binary16 a.k.a “half” format.

Enums§

AllocationProperty
The kind of allocation behind the Bytes type.
BoolStore
Data type used to store boolean values.
DType
DataError
The things that can go wrong when manipulating tensor data.
Distribution
Distribution for random value of a tensor.
DistributionSamplerKind
Distribution sampler kind for random value of a tensor.
FloatDType
IntDType
Scalar
A scalar element.

Traits§

Element
Core element trait for tensor values.
ElementComparison
Element ordering trait.
ElementConversion
Element conversion trait for tensor.
ElementEq
Element trait for equality of a tensor.
ElementLimits
Element limits trait.
ElementOrdered
Ordered element trait for tensor values.
ElementRandom
Element trait for random value of a tensor.

Functions§

read_sync
Read a future synchronously.
try_read_sync
Read a future synchronously.

Type Aliases§

BoolDType
Boolean dtype.