Module tensor

Module tensor 

Source

Re-exports§

pub use identity::*;
pub use view::*;

Modules§

identity
index_offset_contiguous
index_offset_contiguous_fastdivmod
index_offset_with_layout
layout
view
virtual

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

Constants§

NUM_SM_APPROX

Functions§

compact_strides
index_offset_contiguous
Returns the offset of the tensor corresponding to a contiguous layout.
index_offset_contiguous_fastdivmod
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_packed
Make a jit tensor contiguous, using the pitched allocator if available. See create_tensor. Handles unpacking and repacking packed tensors (i.e. quantized values). shape refers to the actual (unpacked) shape of the tensor, while packing specifies the number of elements in each storage element.
into_contiguous_packed_ref
Make a jit tensor contiguous.
into_contiguous_pitched
Make a jit tensor contiguous, using the pitched allocator if available. See create_tensor.
into_contiguous_ref
Make a jit tensor contiguous.
is_contiguous
Checks if the tensor associated with the given shape and strides is contiguous.
is_contiguous_pitched
Checks if a tensor is only strided on the last dimension, and could be safely reinterpreted as a 2D tensor with unit stride on the last dimension. This will always hold for non-permuted tensors allocated on a runtime.
matrix_batch_layout
Return the layout of a matrix batch given the strides.