Module tensor

Source
Expand description

Contains basic tensor helpers.

Re-exports§

pub use identity::*;

Modules§

identity
index_offset_contiguous
index_offset_with_layout

Structs§

TensorHandle
Tensor representation containing a server handle as well as basic tensor metadata.,

Enums§

MatrixBatchLayout
Layout for matrix batch tensors, i.e. tensors whose interpretation is a bunch of batched matrices of 2 dimensions
StridedLayout
Layout for tensor that may or may not be strided on the last dimension. Efficiently translates the absolute index to strided index.
StridedLayoutArgs
StridedLayoutCompilationArg
StridedLayoutExpand

Functions§

index_offset_contiguous
Returns the offset of the tensor corresponding to a contiguous layout.
index_offset_with_layout
Returns the offset of the tensor corresponding to the layout tensor.
into_contiguous
Make a jit tensor contiguous.
into_contiguous_pitched
Make a jit tensor contiguous, using the pitched allocator if available. See create_tensor.
into_contiguous_prefetch
Make a jit tensor contiguous.
matrix_batch_layout
Return the layout of a matrix batch given the strides.