Skip to main content

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§

ErasedTensor
A tensor that has forgotten its line width. See the module docs.
ErasedTensorExpand
Expand type for ErasedTensor.
ErasedView
Any view, at a width named once here and forgotten after.
ErasedViewMut
Any mutable view. As ErasedView, with the write half as well.
TensorHandle
Tensor representation containing a server handle as well as basic tensor metadata.,
WriteOnly
Visibility marker for a destination that is written and never read.

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

Traits§

ErasedBacking
A backing that can be wrapped at visibility IO.
ErasedIo
The visibility markers an ErasedTensor accepts.
ErasedIoRead
A visibility that permits reads.
ErasedIoWrite
A visibility that permits writes.
ErasedTensorOperationsExpand
What a backing has to answer to be an ErasedTensor.
ReadsLines
A backing whose __expand_read_line_method is real rather than the default.
WritesLines
A backing whose __expand_write_line_method is real rather than the default.

Functions§

compact_strides
copy_gpu_ref
Make a jit tensor contiguous.
copy_into
Copies the input tensor into the output tensor following the 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.
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.
launch_copy_perpendicular_ref
Launches the perpendicular contiguous kernel.
launch_into_contiguous_perpendicular
Launches the perpendicular contiguous kernel.
matrix_batch_layout
Return the layout of a matrix batch given the strides.