Available on crate feature
api only.Expand description
Public tensor API built on the shared backend contracts and primitives.
Re-exports§
pub use crate::TensorPrimitive;pub use crate::ops::TransactionPrimitive;pub use crate::tensor::Bool;pub use crate::tensor::Float;pub use crate::tensor::Int;pub use crate::tensor::TensorKind;pub use ops::Device;pub use crate::get_device_settings;pub use crate::set_default_dtypes;pub use crate::tensor::BasicAutodiffOps;pub use crate::tensor::BasicOps;pub use crate::tensor::Numeric;pub use crate::indexing::*;pub use crate::shape::*;pub use crate::slice::*;
Modules§
- activation
- The activation module.
- backend
- The backend module.
- cast
- Tensor element casting.
- container
- The container module.
- grid
- The grid module.
- linalg
- The linalg module.
- loss
- The loss module.
- module
- The neural network module.
- ops
- Operations on tensors module.
- quantization
- Tensor quantization module.
- signal
- The signal processing module.
- sparse
Structs§
- Bytes
- A buffer similar to
Box<[u8]>that supports custom memory alignment and allows trailing uninitialized bytes. - Device
Settings - Settings controlling the default data types for a specific device.
- DimIter
- Iterator given by (Tensor::iter_dim).
- Distribution
Sampler - Distribution sampler for random value of a tensor.
- Print
Options - Options for Tensor pretty printing
- Stream
Id - Unique identifier that can represent a stream based on the current thread id.
- Tensor
- A tensor with a given backend, shape and data type.
- Tensor
Creation Options - Options for tensor creation.
- Tensor
Data - Data structure for tensors.
- Tolerance
- The tolerance used to compare to floating point numbers.
- Transaction
- A transaction can read multiple tensors at once with a single operation improving compute utilization with optimized laziness.
- bf16
- A 16-bit floating point type implementing the
bfloat16format. - f16
- A 16-bit floating point type implementing the IEEE 754-2008 standard
binary16a.k.a “half” format.
Enums§
- Allocation
Property - The kind of allocation behind the Bytes type.
- Bool
Store - Data type used to store boolean values.
- DType
- Data
Error - The things that can go wrong when manipulating tensor data.
- Distribution
- Distribution for random value of a tensor.
- Distribution
Sampler Kind - Distribution sampler kind for random value of a tensor.
- FloatD
Type - Indexing
Update Op - Computation to be used to update the existing values in indexed assignment operations (scatter/select).
- IntD
Type - Scalar
- A scalar element.
Constants§
- DEFAULT_
ATOL - Default ATOL value for
is_closeandall_close. - DEFAULT_
RTOL - Default RTOL value for
is_closeandall_close.
Traits§
- Broadcast
Args - Trait used for broadcast arguments.
- Cast
- Trait for types that represent a valid cast target from a tensor of kind
K. - Element
- Core element trait for tensor values.
- Element
Comparison - Element ordering trait.
- Element
Conversion - Element conversion trait for tensor.
- Element
Eq - Element trait for equality of a tensor.
- Element
Limits - Element limits trait.
- Element
Ordered - Ordered element trait for tensor values.
- Element
Random - Element trait for random value of a tensor.
- Into
Padding - Trait for types that can be used as padding specifications.
- Movedim
Args - Trait used for movedim arguments
- Reshape
Args - Trait used for reshape arguments.
- Tensor
Metadata - Tensor metadata trait for tensor primitive.
Functions§
- cartesian_
grid - Generates a cartesian grid for the given tensor shape on the specified device.
The generated tensor is of dimension
D2 = D + 1, where each element at dimension D contains the cartesian grid coordinates for that element. - check_
closeness api-std - Checks the closeness of two tensors and prints the results.
- read_
sync - Read a future synchronously.
- set_
print_ options - Set print options
- try_
read_ sync - Read a future synchronously.
Type Aliases§
- BoolD
Type - Boolean dtype.