pub struct DeviceBackend<R, F, I, BT>{ /* private fields */ }Expand description
Generic tensor backend that can be compiled just-in-time to any shader runtime
Implementations§
Source§impl<R, F, I, BT> DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> DeviceBackend<R, F, I, BT>
Sourcepub fn new() -> DeviceBackend<R, F, I, BT>
pub fn new() -> DeviceBackend<R, F, I, BT>
Constructs a new DeviceBackend.
Trait Implementations§
Source§impl<R, F, I, BT> ActivationOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> ActivationOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§fn silu(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn silu( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Applies SiLU element-wise. Backends may fuse its arithmetic and rounding.
Source§fn leaky_relu(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
negative_slope: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn leaky_relu( tensor: <B as BackendTypes>::FloatTensorPrimitive, negative_slope: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the LeakyReLU activation function. Read more
Source§fn relu(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn relu( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the ReLU activation function. Read more
Source§fn relu_backward(
output: <B as BackendTypes>::FloatTensorPrimitive,
grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn relu_backward( output: <B as BackendTypes>::FloatTensorPrimitive, grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the ReLU activation function backward. Read more
Source§fn gelu(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn gelu( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the Gelu activation function. Read more
Source§fn prelu(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
alpha: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn prelu( tensor: <B as BackendTypes>::FloatTensorPrimitive, alpha: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the PReLu activation function. Read more
Source§fn gelu_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn gelu_backward( x: <B as BackendTypes>::FloatTensorPrimitive, grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the Gelu activation function backward. Read more
Source§fn sigmoid(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn sigmoid( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the Sigmoid activation function. Read more
Source§fn sigmoid_backward(
output: <B as BackendTypes>::FloatTensorPrimitive,
grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn sigmoid_backward( output: <B as BackendTypes>::FloatTensorPrimitive, grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the Sigmoid activation function backward. Read more
Source§fn hard_sigmoid(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
alpha: Scalar,
beta: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn hard_sigmoid( tensor: <B as BackendTypes>::FloatTensorPrimitive, alpha: Scalar, beta: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the hard Sigmoid activation function. Read more
Source§fn log_sigmoid(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn log_sigmoid( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the LogSigmoid activation function. Read more
Source§fn softmax(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn softmax( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the softmax function along the given dimension. Read more
Source§fn log_softmax(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn log_softmax( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the log-softmax function along the given dimension. Read more
Source§fn softmin(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn softmin( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the softmin function along the given dimension. Read more
Source§fn log_sigmoid_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn log_sigmoid_backward( x: <B as BackendTypes>::FloatTensorPrimitive, grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies the LogSigmoid activation function backward. Read more
Source§impl<R, F, I, BT> Backend for DeviceBackend<R, F, I, BT>where
R: DeviceRuntime,
<R as Runtime>::Server: ComputeServer,
<R as Runtime>::Device: DeviceOps,
F: FloatElement,
I: IntElement,
BT: BoolElement,
impl<R, F, I, BT> Backend for DeviceBackend<R, F, I, BT>where
R: DeviceRuntime,
<R as Runtime>::Server: ComputeServer,
<R as Runtime>::Device: DeviceOps,
F: FloatElement,
I: IntElement,
BT: BoolElement,
Source§fn name(device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device) -> String
fn name(device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device) -> String
Name of the backend.
Source§fn seed(
_device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
seed: u64,
)
fn seed( _device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, seed: u64, )
Seeds the backend on the specified device. Read more
Source§fn ad_enabled(
_device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> bool
fn ad_enabled( _device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> bool
If autodiff is enabled.
Source§fn sync(
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> Result<(), ExecutionError>
fn sync( device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> Result<(), ExecutionError>
Sync the backend, ensure that all computation are finished.
Source§fn memory_persistent_allocations<Output, Input, Func>(
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
input: Input,
func: Func,
) -> Output
fn memory_persistent_allocations<Output, Input, Func>( device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, input: Input, func: Func, ) -> Output
Sets the current allocation mode to persistent.
Source§fn memory_cleanup(device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device)
fn memory_cleanup(device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device)
Manually triggers a memory cleanup on the given device.
Source§fn staging<'a, Iter>(
data: Iter,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
)where
Iter: Iterator<Item = &'a mut TensorData>,
fn staging<'a, Iter>(
data: Iter,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
)where
Iter: Iterator<Item = &'a mut TensorData>,
Marks the given data as being used as a staging buffer for transfer between CPU and
accelerators like GPUs. Read more
Source§fn supports_dtype(
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: DType,
) -> bool
fn supports_dtype( device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: DType, ) -> bool
Whether the type is fully supported by the specified device for general operations. Read more
Source§fn dtype_usage(
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: DType,
) -> EnumSet<DTypeUsage>
fn dtype_usage( device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: DType, ) -> EnumSet<DTypeUsage>
Returns the DTypeUsageSet for the given DType on the specified device.
Source§fn device_count(type_id: u16) -> usize
fn device_count(type_id: u16) -> usize
Returns the number of devices available on this backend.
device is a reference device used to determine the underlying backend that should be queried.
A CUDA device will return all devices available to CUDA, a Vulkan device will return all
devices available to Vulkan, etc.Source§impl<R, F, I, BT> BackendIr for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> BackendIr for DeviceBackend<R, F, I, BT>
Source§type Handle = RudaFusionHandle<R>
type Handle = RudaFusionHandle<R>
The type that can be used to point to a tensor of any kind.
Source§fn float_tensor(
handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_tensor( handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Convert a handle to a float tensor.
Source§fn int_tensor(
handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_tensor( handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Convert a handle to an int tensor.
Source§fn bool_tensor(
handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_tensor( handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Convert a handle to a bool tensor.
Source§fn quantized_tensor(
handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn quantized_tensor( handle: TensorHandle<<DeviceBackend<R, F, I, BT> as BackendIr>::Handle>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Convert a handle to a quantized tensor.
Source§fn float_tensor_handle(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
fn float_tensor_handle( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
Convert a float tensor to a handle.
Source§fn int_tensor_handle(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
fn int_tensor_handle( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
Convert an int tensor to a handle.
Source§fn bool_tensor_handle(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
fn bool_tensor_handle( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
Convert a bool tensor to a handle.
Source§fn quantized_tensor_handle(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
fn quantized_tensor_handle( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
Convert a quantized tensor to a handle.
Source§impl<R, F, I, BT> BackendTypes for DeviceBackend<R, F, I, BT>where
R: DeviceRuntime,
<R as Runtime>::Server: ComputeServer,
<R as Runtime>::Device: DeviceOps,
F: FloatElement,
I: IntElement,
BT: BoolElement,
impl<R, F, I, BT> BackendTypes for DeviceBackend<R, F, I, BT>where
R: DeviceRuntime,
<R as Runtime>::Server: ComputeServer,
<R as Runtime>::Device: DeviceOps,
F: FloatElement,
I: IntElement,
BT: BoolElement,
Source§type FloatTensorPrimitive = RudaTensor<R>
type FloatTensorPrimitive = RudaTensor<R>
Tensor primitive to be used for all float operations.
Source§type IntTensorPrimitive = RudaTensor<R>
type IntTensorPrimitive = RudaTensor<R>
Tensor primitive to be used for all int operations.
Source§type BoolTensorPrimitive = RudaTensor<R>
type BoolTensorPrimitive = RudaTensor<R>
Tensor primitive to be used for all bool operations.
Source§type QuantizedTensorPrimitive = RudaTensor<R>
type QuantizedTensorPrimitive = RudaTensor<R>
Tensor primitive to be used for all quantized operations.
Source§impl<R, F, I, BT> BoolTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> BoolTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§fn bool_empty(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_empty( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Creates a new bool tensor. Read more
Source§fn bool_zeros(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_zeros( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Creates a new bool tensor filled false. Read more
Source§fn bool_ones(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_ones( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Creates a new bool tensor filled true. Read more
Source§async fn bool_into_data(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn bool_into_data( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn bool_from_data(
data: TensorData,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_from_data( data: TensorData, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Creates a tensor from the data structure. Read more
Source§fn bool_into_int(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
out_dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bool_into_int( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, out_dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Converts bool tensor to int tensor. Read more
Source§fn bool_device(
tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
fn bool_device( tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
Gets the device of the tensor. Read more
Source§fn bool_to_device(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_to_device( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Moves the tensor to the device.
Source§fn bool_reshape(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_reshape( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Reshapes the tensor. Read more
Source§fn bool_slice(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
slices: &[Slice],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_slice( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, slices: &[Slice], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Gets the values from the tensor for the given ranges. Read more
Source§fn bool_slice_assign(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
ranges: &[Slice],
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_slice_assign( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ranges: &[Slice], value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Sets the values in the tensor for the given ranges. Read more
Source§fn bool_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Equates the two tensors. Read more
Source§fn bool_not(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_not( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Inverses boolean values. Read more
Source§fn bool_and(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_and( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Executes the logical and (
&&) operation on two boolean tensors. Read moreSource§fn bool_or(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_or( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Executes the logical or (
||) operation on two boolean tensors. Read moreSource§fn bool_into_float(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
out_dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn bool_into_float( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, out_dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Converts bool tensor to float tensor. Read more
Source§fn bool_swap_dims(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_swap_dims( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, dim1: usize, dim2: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Swaps two dimensions of a bool tensor. Read more
Source§fn bool_repeat_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
dim: usize,
times: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_repeat_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, dim: usize, times: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Repeats one dimension of the tensor a given number of times along that dimension. Read more
Source§fn bool_permute(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_permute( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn bool_expand(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_expand( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Broadcasts the bool
tensor to the given shape.Source§fn bool_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Select tensor elements along the given dimension corresponding to the given indices. Read more
Source§fn bool_select_or(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_select_or( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Assign the selected elements along the given dimension corresponding to the given indices
to the given value using sum reduction. Read more
Source§fn bool_flip(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_flip( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn bool_unfold(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn bool_unfold( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Unfold windows along a dimension. Read more
Source§fn bool_mask_where(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_mask_where( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Fills the tensor with values from the value tensor if the mask is true at the given
indices. Read more
Source§fn bool_mask_fill(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
value: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_mask_fill( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, value: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Fills the tensor with the given value if the mask is true at the given indices. Read more
Source§fn bool_gather(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_gather( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Gather elements from the tensor at the given indices. Read more
Source§fn bool_scatter_or(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_scatter_or( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Scatter a given value to the tensor at the given indices using boolean or reduction. Read more
Source§fn bool_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn bool_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise equality comparison with a scalar. Read more
Source§fn bool_cat(
tensors: Vec<<B as BackendTypes>::BoolTensorPrimitive>,
dim: usize,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_cat( tensors: Vec<<B as BackendTypes>::BoolTensorPrimitive>, dim: usize, ) -> <B as BackendTypes>::BoolTensorPrimitive
Concatenates the tensors along the given dimension. Read more
Source§fn bool_not_equal(
lhs: <B as BackendTypes>::BoolTensorPrimitive,
rhs: <B as BackendTypes>::BoolTensorPrimitive,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_not_equal( lhs: <B as BackendTypes>::BoolTensorPrimitive, rhs: <B as BackendTypes>::BoolTensorPrimitive, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn bool_not_equal_elem(
lhs: <B as BackendTypes>::BoolTensorPrimitive,
rhs: Scalar,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_not_equal_elem( lhs: <B as BackendTypes>::BoolTensorPrimitive, rhs: Scalar, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn bool_xor(
lhs: <B as BackendTypes>::BoolTensorPrimitive,
rhs: <B as BackendTypes>::BoolTensorPrimitive,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_xor( lhs: <B as BackendTypes>::BoolTensorPrimitive, rhs: <B as BackendTypes>::BoolTensorPrimitive, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise exclusive or. Read more
Source§fn bool_transpose(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_transpose( tensor: <B as BackendTypes>::BoolTensorPrimitive, ) -> <B as BackendTypes>::BoolTensorPrimitive
Transposes a bool tensor. Read more
Source§fn bool_any(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_any( tensor: <B as BackendTypes>::BoolTensorPrimitive, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if any element in the boolean
tensor evaluates to True. Read moreSource§fn bool_any_dim(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_any_dim( tensor: <B as BackendTypes>::BoolTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn bool_all(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_all( tensor: <B as BackendTypes>::BoolTensorPrimitive, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the boolean
tensor evaluate to True. Read moreSource§fn bool_all_dim(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn bool_all_dim( tensor: <B as BackendTypes>::BoolTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn bool_argwhere(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
out_dtype: IntDType,
) -> impl Future<Output = <B as BackendTypes>::IntTensorPrimitive> + Send + 'static
fn bool_argwhere( tensor: <B as BackendTypes>::BoolTensorPrimitive, out_dtype: IntDType, ) -> impl Future<Output = <B as BackendTypes>::IntTensorPrimitive> + Send + 'static
Compute the indices of the elements that are non-zero, grouped by element. Read more
Source§impl<R, F, I, BT> Clone for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> Clone for DeviceBackend<R, F, I, BT>
Source§fn clone(&self) -> DeviceBackend<R, F, I, BT>
fn clone(&self) -> DeviceBackend<R, F, I, BT>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R, F, I, BT> Debug for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> Debug for DeviceBackend<R, F, I, BT>
Source§impl<R, F, I, BT> Default for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> Default for DeviceBackend<R, F, I, BT>
Source§fn default() -> DeviceBackend<R, F, I, BT>
fn default() -> DeviceBackend<R, F, I, BT>
Returns the “default value” for a type. Read more
Source§impl<R, F, I, BT> ExpertProjectionOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> ExpertProjectionOps for DeviceBackend<R, F, I, BT>
Source§type ExpertProjectionError = MoeError
type ExpertProjectionError = MoeError
Original native row/projection or first-order differentiation failure.
Source§type ExpertProjectionState = NativeExpertProjectionState<R>
type ExpertProjectionState = NativeExpertProjectionState<R>
Original actual floating cube and native private COPY row mapping.
Source§fn expert_projection_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
weights: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ExpertProjectionOptions,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionState), <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionError>
fn expert_projection_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, weights: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ExpertProjectionOptions, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionState), <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionError>
Execute actual U32 assigned expert projections and restore original incoming row order.
Source§fn expert_projection_backward(
state: <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
selection: ExpertProjectionSelection,
) -> Result<ExpertProjectionBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionError>
fn expert_projection_backward( state: <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, selection: ExpertProjectionSelection, ) -> Result<ExpertProjectionBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as ExpertProjectionOps>::ExpertProjectionError>
Native first-order selected derivatives, without allocations for omitted cube/input gradients.
Source§impl<R, F, I, BT> FloatTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FloatTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§fn float_from_data(
data: TensorData,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_from_data( data: TensorData, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Creates a new tensor from the data structure. Read more
Source§fn float_random(
shape: Shape,
distribution: Distribution,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_random( shape: Shape, distribution: Distribution, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Creates a new tensor with random values. Read more
Source§async fn float_into_data(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn float_into_data( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn float_device(
tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
fn float_device( tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
Gets the device of the tensor. Read more
Source§fn float_to_device(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_to_device( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Moves the tensor to the given device. Read more
Source§fn float_empty(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_empty( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Creates an empty tensor with the given shape. Read more
Source§fn float_add(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_add( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Adds two tensors together. Read more
Source§fn float_add_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_add_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Adds a scalar to a tensor. Read more
Source§fn float_zeros(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_zeros( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Creates a new tensor with zeros. Read more
Source§fn float_full(
shape: Shape,
fill_value: Scalar,
device: &<R as Runtime>::Device,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_full( shape: Shape, fill_value: Scalar, device: &<R as Runtime>::Device, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Creates a tensor filled with given value. Read more
Source§fn float_ones(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_ones( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Creates a new tensor with ones. Read more
Source§fn float_sub(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sub( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Subtracts two tensors. Read more
Source§fn float_sub_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sub_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Subtracts a scalar from a tensor. Read more
Source§fn float_mul(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_mul( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Multiplies two tensors together element-wise.
Source§fn float_mul_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_mul_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Multiplies a tensor by a scalar. Read more
Source§fn float_div(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_div( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Divides two tensors element-wise. Read more
Source§fn float_div_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_div_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Divides a tensor by a scalar. Read more
Source§fn float_remainder(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_remainder( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the remainder of division between two tensors element-wise. Read more
Source§fn float_remainder_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_remainder_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the modulus of a tensor given a scalar. Read more
Source§fn float_matmul(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_matmul( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Multiplies two tensors together using matrix multiplication. Read more
Source§fn float_cross(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cross( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the cross product of two tensors along a given dimension. Read more
Source§fn float_swap_dims(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_swap_dims( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim1: usize, dim2: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Swaps two dimensions of a tensor. Read more
Source§fn float_reshape(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_reshape( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Reshapes a tensor. Read more
Source§fn float_gather(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_gather( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gather elements from a tensor. Read more
Source§fn float_scatter_add(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_scatter_add( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Scatter elements into a tensor using sum reduction. Read more
Source§fn float_scatter_nd(
data: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
values: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
reduction: IndexingUpdateOp,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_scatter_nd( data: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, values: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, reduction: IndexingUpdateOp, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Source§fn float_gather_nd(
data: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_gather_nd( data: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Source§fn float_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
Source§fn float_select_add(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_select_add( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Assign the selected elements along the given dimension corresponding for the given indices
to the given value using sum reduction. Read more
Source§fn float_slice(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
slices: &[Slice],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_slice( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, slices: &[Slice], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Select tensor elements corresponding to the given slices. Read more
Source§fn float_slice_assign(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
ranges: &[Slice],
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_slice_assign( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ranges: &[Slice], value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Assign the selected elements corresponding to the given slices to the given value. Read more
Source§fn float_mask_where(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_mask_where( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Update the given tensor with the value tensor where the mask is true. Read more
Source§fn float_mask_fill(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
value: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_mask_fill( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, value: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Update the given tensor with the value where the mask is true. Read more
Source§fn float_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Equal comparison of two tensors. Read more
Source§fn float_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Equal comparison of a tensor and a scalar. Read more
Source§fn float_greater(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_greater( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Greater than comparison of two tensors. Read more
Source§fn float_greater_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_greater_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Greater than comparison of a tensor and a scalar. Read more
Source§fn float_greater_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_greater_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Greater than or equal comparison of two tensors. Read more
Source§fn float_greater_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_greater_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Greater than or equal comparison of a tensor and a scalar. Read more
Source§fn float_lower(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_lower( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Less than comparison of two tensors. Read more
Source§fn float_lower_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_lower_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Less than comparison of a tensor and a scalar. Read more
Source§fn float_lower_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_lower_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Less than or equal comparison of two tensors. Read more
Source§fn float_lower_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_lower_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Less than or equal comparison of a tensor and a scalar. Read more
Source§fn float_sum(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sum( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Sum of all elements in a tensor. Read more
Source§fn float_max(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_max( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn float_max_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_max_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
Source§fn float_min(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_min( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the minimum element of a tensor. Read more
Source§fn float_min_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_min_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the minimum elements of a tensor along an axis. Read more
Source§fn float_max_abs(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_max_abs( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the maximum absolute element of a tensor. Read more
Source§fn float_max_abs_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_max_abs_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the maximum absolute elements of a tensor along an axis. Read more
Source§fn float_sum_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sum_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Sum of all elements in a tensor along a dimension. Read more
Source§fn float_mean_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_mean_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Mean of all elements in a tensor along a dimension. Read more
Source§fn float_mean(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_mean( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Mean of all elements in a tensor. Read more
Source§fn float_cumsum(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cumsum( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the cumulative sum of elements along a dimension. Read more
Source§fn float_cumprod(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cumprod( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the cumulative product of elements along a dimension. Read more
Source§fn float_cummin(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cummin( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn float_cummax(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cummax( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn float_prod(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_prod( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Product of all elements in a tensor. Read more
Source§fn float_prod_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_prod_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Product of all elements in a tensor along a dimension. Read more
Source§fn float_exp(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_exp( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with exponential values. Read more
Source§fn float_log(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_log( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with natural logarithm values. Read more
Source§fn float_log1p(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_log1p( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with logarithm values of (1 + Xi). Read more
Source§fn float_powi_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_powi_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar. Read more
Source§fn float_powi_scalar_impl(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_powi_scalar_impl( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar. Read more
Source§fn float_powf_scalar_impl(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_powf_scalar_impl( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float
value. Read moreSource§fn float_sqrt(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sqrt( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with square root values. Read more
Source§fn float_rsqrt(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_rsqrt( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns element-wise reciprocal square roots. Backends may provide a native instruction.
Source§fn float_abs(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_abs( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with absolute values. Read more
Source§fn float_sign(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sign( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns the signs of the float
tensor. Read moreSource§fn float_cos(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cos( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with cosine values. Read more
Source§fn float_sin(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sin( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with sine values. Read more
Source§fn float_tan(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_tan( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with tangent values. Read more
Source§fn float_cosh(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cosh( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with hyperbolic cosine values. Read more
Source§fn float_sinh(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_sinh( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with hyperbolic sine values. Read more
Source§fn float_tanh(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_tanh( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with hyperbolic tangent values. Read more
Source§fn float_acos(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_acos( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse cosine values. Read more
Source§fn float_acosh(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_acosh( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse hyperbolic cosine values. Read more
Source§fn float_asin(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_asin( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse sine values. Read more
Source§fn float_asinh(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_asinh( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse hyperbolic sine values. Read more
Source§fn float_atan(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_atan( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the inverse tangent values. Read more
Source§fn float_atanh(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_atanh( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the inverse hyperbolic tangent values. Read more
Source§fn float_atan2(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_atan2( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Source§fn float_round(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_round( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with rounded values. Read more
Source§fn float_floor(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_floor( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with floored values. Read more
Source§fn float_ceil(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_ceil( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with ceiled values. Read more
Source§fn float_trunc(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_trunc( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with truncated values. Read more
Source§fn float_erf(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_erf( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the error function values. Read more
Source§fn float_argmax(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn float_argmax( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
Source§fn float_argtopk(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
k: usize,
out_dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn float_argtopk( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, k: usize, out_dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the indices of the k maximum elements of a tensor along an axis.
if two elements are equals, it will be ordered by lowest indices Read more
Source§fn float_topk(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
k: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_topk( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, k: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Gets the values of the k maximum elements of a tensor along an axis. Read more
Source§fn float_argmin(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn float_argmin( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
Source§fn float_into_int(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn float_into_int( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Converts float tensor to int tensor. Read more
Source§fn float_clamp(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
min: Scalar,
max: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_clamp( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, min: Scalar, max: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
Source§fn float_recip(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_recip( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Calculates the reciprocals element-wise
Source§fn float_repeat_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
times: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_repeat_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, times: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Repeat the tensor along the given dimension. Read more
Source§fn float_powf(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_powf( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Element-wise power with a FloatTensor. Read more
Source§fn float_powi(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_powi( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Element-wise power with an IntTensor. Read more
Source§fn float_permute(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_permute( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn float_expand(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_expand( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Broadcasts the float
tensor to the given shape.Source§fn float_flip(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_flip( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn float_cast(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_cast( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Converts a tensor to another floating point data type. Read more
Source§fn float_unfold(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_unfold( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Unfold windows along a dimension. Read more
Source§fn float_is_nan(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_is_nan( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Returns a new tensor with boolean elements indicating whether each element of the input is NaN. Read more
Source§fn float_is_inf(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn float_is_inf( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Returns a new tensor with boolean elements indicating whether each element of the input is infinite (either +INF or -INF). Read more
Source§fn float_grid_sample_2d(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grid: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: GridSampleOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn float_grid_sample_2d( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grid: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: GridSampleOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Samples tensor as a two-dimensional spatial grid of (possibly multi-channel) values,
using the given locations in [-1, 1]. Read more
Source§fn float_clamp_min(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
min: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_clamp_min( tensor: <B as BackendTypes>::FloatTensorPrimitive, min: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Clamps a tensor under a minimum value. Read more
Source§fn float_clamp_max(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
max: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_clamp_max( tensor: <B as BackendTypes>::FloatTensorPrimitive, max: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Clamps a tensor over a maximum value. Read more
Source§fn float_neg(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_neg( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Negates a tensor element-wise.
Source§fn float_transpose(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_transpose( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Transposes a tensor. Read more
Source§fn float_not_equal(
lhs: <B as BackendTypes>::FloatTensorPrimitive,
rhs: <B as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn float_not_equal( lhs: <B as BackendTypes>::FloatTensorPrimitive, rhs: <B as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn float_not_equal_elem(
lhs: <B as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn float_not_equal_elem( lhs: <B as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn float_detach(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_detach( tensor: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Detaches a tensor from the computation graph.
Source§fn float_set_require_grad(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
_require_grad: bool,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_set_require_grad( tensor: <B as BackendTypes>::FloatTensorPrimitive, _require_grad: bool, ) -> <B as BackendTypes>::FloatTensorPrimitive
Sets the
require_grad flag of a tensor.Source§fn float_is_require_grad(
_tensor: &<B as BackendTypes>::FloatTensorPrimitive,
) -> bool
fn float_is_require_grad( _tensor: &<B as BackendTypes>::FloatTensorPrimitive, ) -> bool
Returns the
require_grad flag of a tensor.Source§fn float_powf_scalar(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
value: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_powf_scalar( tensor: <B as BackendTypes>::FloatTensorPrimitive, value: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float
value. Read moreSource§fn float_cat(
tensors: Vec<<B as BackendTypes>::FloatTensorPrimitive>,
dim: usize,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_cat( tensors: Vec<<B as BackendTypes>::FloatTensorPrimitive>, dim: usize, ) -> <B as BackendTypes>::FloatTensorPrimitive
Concatenates tensors along a dimension. Read more
Source§fn float_max_dim_with_indices(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices_dtype: IntDType,
) -> (<B as BackendTypes>::FloatTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn float_max_dim_with_indices( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, indices_dtype: IntDType, ) -> (<B as BackendTypes>::FloatTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis and their indices. Read more
Source§fn float_min_dim_with_indices(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices_dtype: IntDType,
) -> (<B as BackendTypes>::FloatTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn float_min_dim_with_indices( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, indices_dtype: IntDType, ) -> (<B as BackendTypes>::FloatTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
Source§fn float_any(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn float_any( tensor: <B as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if any element in the float
tensor evaluates to True. Read moreSource§fn float_any_dim(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn float_any_dim( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn float_all(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn float_all( tensor: <B as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the float
tensor evaluate to True. Read moreSource§fn float_all_dim(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn float_all_dim( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn float_sort(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_sort( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, descending: bool, ) -> <B as BackendTypes>::FloatTensorPrimitive
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn float_sort_with_indices(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
descending: bool,
indices_dtype: IntDType,
) -> (<B as BackendTypes>::FloatTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn float_sort_with_indices( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, descending: bool, indices_dtype: IntDType, ) -> (<B as BackendTypes>::FloatTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn float_argsort(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
descending: bool,
out_dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn float_argsort( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, descending: bool, out_dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor by value along a given dimension. Read moreSource§impl<R, F, I, BT> FrozenAwqOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FrozenAwqOps for DeviceBackend<R, F, I, BT>
Source§type AwqError = Int4Error
type AwqError = Int4Error
Native validation/launch failure, including autodiff frozen-base validation.
Source§fn frozen_awq_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
qweight: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
qzeros: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
group_size: usize,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenAwqOps>::AwqError>
fn frozen_awq_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, qweight: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, qzeros: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, group_size: usize, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenAwqOps>::AwqError>
Native packed projection, optionally biased. Output retains input dtype
and leading axes; input storage may differ from original scale storage.
Source§fn frozen_awq_input_backward(
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
qweight: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
qzeros: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
group_size: usize,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenAwqOps>::AwqError>
fn frozen_awq_input_backward( gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, qweight: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, qzeros: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, group_size: usize, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenAwqOps>::AwqError>
Apply the transpose of the same rounded packed coefficients, retaining
gradient dtype/leading axes. No weight/scales/bias gradients are implied.
Source§impl<R, F, I, BT> FrozenNf4GroupedOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FrozenNf4GroupedOps for DeviceBackend<R, F, I, BT>
Source§type Nf4GroupedError = Nf4ExpertError
type Nf4GroupedError = Nf4ExpertError
Native projection/routing failure or unsupported derivative contract.
Source§type Nf4GroupedState = NativeNf4GroupedState<R>
type Nf4GroupedState = NativeNf4GroupedState<R>
Validated original row permutation and actual frozen packed operands.
Source§fn frozen_nf4_grouped_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
payload: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedState), <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
fn frozen_nf4_grouped_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, payload: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedState), <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
Execute one actual assigned expert per incoming row and preserve original row order.
Source§fn frozen_nf4_grouped_input_backward(
state: <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
fn frozen_nf4_grouped_input_backward( state: <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
Original first-order input VJP, returned in original activation storage.
Source§impl<R, F, I, BT> FrozenNf4Ops for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FrozenNf4Ops for DeviceBackend<R, F, I, BT>
Source§fn frozen_nf4_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
packed: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
codebook: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: Nf4ProjectionOptions,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4Ops>::Nf4Error>
fn frozen_nf4_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, packed: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, codebook: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: Nf4ProjectionOptions, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4Ops>::Nf4Error>
Native packed projection. Output retains incoming floating activation storage.
Source§fn frozen_nf4_input_backward(
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
packed: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
codebook: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: Nf4ProjectionOptions,
activation_dtype: FloatDType,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4Ops>::Nf4Error>
fn frozen_nf4_input_backward( gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, packed: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, scales: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, codebook: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: Nf4ProjectionOptions, activation_dtype: FloatDType, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4Ops>::Nf4Error>
Original input VJP: cast incoming gradient to original activation storage,
accumulate FP32 and return that original activation dtype, without base gradients.
Source§impl<R, F, I, BT> FrozenNf4SwiGluOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FrozenNf4SwiGluOps for DeviceBackend<R, F, I, BT>
Source§type Nf4SwiGluState = NativeNf4SwiGluState<R>
type Nf4SwiGluState = NativeNf4SwiGluState<R>
Original native row mapping and optional actual input VJP intermediates.
Source§fn frozen_nf4_swiglu_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
gate: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>,
up: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>,
down: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>,
retain_input: bool,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4SwiGluOps>::Nf4SwiGluState), <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
fn frozen_nf4_swiglu_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, gate: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>, up: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>, down: Nf4ExpertPayload<DeviceBackend<R, F, I, BT>>, retain_input: bool, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4SwiGluOps>::Nf4SwiGluState), <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
Execute the original selected frozen expert chain. AD always retains the
cache required by actual tracked input, independently of
retain_input.Source§fn frozen_nf4_swiglu_input_backward(
state: <DeviceBackend<R, F, I, BT> as FrozenNf4SwiGluOps>::Nf4SwiGluState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
fn frozen_nf4_swiglu_input_backward( state: <DeviceBackend<R, F, I, BT> as FrozenNf4SwiGluOps>::Nf4SwiGluState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenNf4GroupedOps>::Nf4GroupedError>
Real native first-order input VJP; no base, discrete selection or higher-order gradients.
Source§impl<R, F, I, BT> FrozenPackedExpertOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FrozenPackedExpertOps for DeviceBackend<R, F, I, BT>
Source§type PackedExpertError = PackedExpertError
type PackedExpertError = PackedExpertError
Original native or first-order derivative contract failure.
Source§type PackedProjectionState = NativePackedProjectionState<R>
type PackedProjectionState = NativePackedProjectionState<R>
Actual packed operand and native private row mapping.
Source§type PackedSwiGluState = NativePackedSwiGluState<R>
type PackedSwiGluState = NativePackedSwiGluState<R>
Actual original row mapping and optional real input VJP intermediates.
Source§fn packed_expert_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
payload: PackedExpertPayload<DeviceBackend<R, F, I, BT>>,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedProjectionState), <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
fn packed_expert_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, payload: PackedExpertPayload<DeviceBackend<R, F, I, BT>>, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedProjectionState), <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
Evaluate only actual assigned experts and restore exact incoming row order.
Source§fn packed_expert_input_backward(
state: <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedProjectionState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
fn packed_expert_input_backward( state: <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedProjectionState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
First-order packed projection input VJP in original activation storage.
Source§fn packed_swiglu_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
gate: PackedExpertPayload<DeviceBackend<R, F, I, BT>>,
up: PackedExpertPayload<DeviceBackend<R, F, I, BT>>,
down: PackedExpertPayload<DeviceBackend<R, F, I, BT>>,
retain_input: bool,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedSwiGluState), <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
fn packed_swiglu_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, gate: PackedExpertPayload<DeviceBackend<R, F, I, BT>>, up: PackedExpertPayload<DeviceBackend<R, F, I, BT>>, down: PackedExpertPayload<DeviceBackend<R, F, I, BT>>, retain_input: bool, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedSwiGluState), <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
Complete native selected gate/up/down and original storage-rounded SwiGLU.
AD preserves required actual input caches even when
retain_input is false.Source§fn packed_swiglu_input_backward(
state: <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedSwiGluState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
fn packed_swiglu_input_backward( state: <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedSwiGluState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as FrozenPackedExpertOps>::PackedExpertError>
Original first-order input VJP through the actual selected packed chain.
Source§impl<R, F, I, BT> FusionBackend for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> FusionBackend for DeviceBackend<R, F, I, BT>
Source§type FusionRuntime = DeviceFusionRuntime<R>
type FusionRuntime = DeviceFusionRuntime<R>
The runtime used for this backend.
Source§type FullPrecisionBackend = DeviceBackend<R, f32, i32, BT>
type FullPrecisionBackend = DeviceBackend<R, f32, i32, BT>
Pointer to the full precision fusion backend.
Source§fn avg_pool3d_output_size(
input: [usize; 3],
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
ceil: bool,
) -> [usize; 3]
fn avg_pool3d_output_size( input: [usize; 3], kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], ceil: bool, ) -> [usize; 3]
Output extents of volume average pooling without executing the operation.
Backends with different padding/ceil rules override the canonical geometry.
Source§fn cast_float(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dtype: DType,
) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
fn cast_float( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dtype: DType, ) -> <DeviceBackend<R, F, I, BT> as BackendIr>::Handle
Cast a float tensor and returns the resulting handle.
Source§fn q_swap_dims_scheme(
scheme: QuantScheme,
rank: usize,
dim1: usize,
dim2: usize,
) -> QuantScheme
fn q_swap_dims_scheme( scheme: QuantScheme, rank: usize, dim1: usize, dim2: usize, ) -> QuantScheme
Scheme produced by
q_swap_dims, without executing the operation.
Override when the backend changes quantization layout rather than requantizing.Source§fn q_permute_scheme(scheme: QuantScheme, axes: &[usize]) -> QuantScheme
fn q_permute_scheme(scheme: QuantScheme, axes: &[usize]) -> QuantScheme
Scheme produced by
q_permute, without executing the operation.
Override when the backend changes quantization layout rather than requantizing.Source§impl<R, F, I, BT> IntTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> IntTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§fn int_empty(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_empty( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Creates a new int tensor. Read more
Source§async fn int_into_data(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn int_into_data( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn int_from_data(
data: TensorData,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_from_data( data: TensorData, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Creates a tensor from the data structure. Read more
Source§fn int_device(
tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
fn int_device( tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
Gets the device of the tensor. Read more
Source§fn int_to_device(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_to_device( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Moves the tensor to the given device.
Source§fn int_reshape(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_reshape( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Reshapes the tensor. Read more
Source§fn int_slice(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
slices: &[Slice],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_slice( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, slices: &[Slice], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the element at the given indices. Read more
Source§fn int_slice_assign(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
ranges: &[Slice],
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_slice_assign( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ranges: &[Slice], value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Sets the values in the tensor for the given ranges. Read more
Source§fn int_matmul(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_matmul( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Multiplies two tensors together using matrix multiplication. Read more
Source§fn int_mask_where(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_mask_where( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Fills the tensor with values from the value tensor if the mask is true at the given
indices. Read more
Source§fn int_mask_fill(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive,
value: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_mask_fill( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, mask: <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive, value: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Fills the tensor with the given value if the mask is true at the given indices. Read more
Source§fn int_gather(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_gather( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gather elements from the tensor at the given indices. Read more
Source§fn int_scatter_add(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_scatter_add( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Scatter a given value to the tensor at the given indices using sum reduction. Read more
Source§fn int_scatter_nd(
data: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
values: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
reduction: IndexingUpdateOp,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_scatter_nd( data: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, values: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, reduction: IndexingUpdateOp, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Multi-dimensional scatter for int tensors.
Source§fn int_gather_nd(
data: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_gather_nd( data: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Multi-dimensional gather for int tensors.
Source§fn int_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Select tensor elements along the given dimension corresponding to the given indices. Read more
Source§fn int_select_add(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_select_add( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Assign the selected elements along the given dimension corresponding to the given indices
to the given value using sum reduction. Read more
Source§fn int_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise equality comparison. Read more
Source§fn int_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise equality comparison with a scalar. Read more
Source§fn int_greater(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_greater( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise greater than comparison. Read more
Source§fn int_greater_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_greater_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise greater than comparison with a scalar. Read more
Source§fn int_greater_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_greater_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise greater than or equal comparison. Read more
Source§fn int_greater_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_greater_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise greater than or equal comparison with a scalar. Read more
Source§fn int_lower(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_lower( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise less than comparison. Read more
Source§fn int_lower_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_lower_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise less than comparison with a scalar. Read more
Source§fn int_lower_equal(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_lower_equal( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise less than or equal comparison. Read more
Source§fn int_lower_equal_elem(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
fn int_lower_equal_elem( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive
Element-wise less than or equal comparison with a scalar. Read more
Source§fn int_add(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_add( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise addition. Read more
Source§fn int_add_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_add_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise addition with a scalar. Read more
Source§fn int_sub(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_sub( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise subtraction. Read more
Source§fn int_sub_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_sub_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise subtraction with a scalar. Read more
Source§fn int_mul(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_mul( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise multiplication. Read more
Source§fn int_mul_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_mul_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise multiplication with a scalar. Read more
Source§fn int_div(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_div( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise division. Read more
Source§fn int_div_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_div_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise division with a scalar. Read more
Source§fn int_remainder(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_remainder( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise modulus. Read more
Source§fn int_remainder_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_remainder_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Element-wise modulus with a scalar. Read more
Source§fn int_zeros(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_zeros( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Creates a tensor of zeros. Read more
Source§fn int_ones(
shape: Shape,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_ones( shape: Shape, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Creates a tensor of ones. Read more
Source§fn int_full(
shape: Shape,
fill_value: Scalar,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_full( shape: Shape, fill_value: Scalar, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Creates a tensor filled with given value. Read more
Source§fn int_sum(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_sum( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Sums all elements in the tensor. Read more
Source§fn int_sum_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_sum_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Sums all elements in the tensor along a dimension. Read more
Source§fn int_prod(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_prod( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the product of all elements in the tensor. Read more
Source§fn int_prod_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_prod_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the product of all elements in the tensor along a dimension. Read more
Source§fn int_max(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_max( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the maximum element in the tensor. Read more
Source§fn int_max_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_max_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the maximum element in the tensor along a dimension. Read more
Source§fn int_topk(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
k: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_topk( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, k: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the values of the k maximum elements along a dimension. Read more
Source§fn int_max_abs(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_max_abs( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the maximum absolute element in the tensor. Read more
Source§fn int_max_abs_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_max_abs_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the maximum absolute element in the tensor along a dimension. Read more
Source§fn int_min(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_min( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the minimum element in the tensor. Read more
Source§fn int_min_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_min_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the minimum elements in the tensor along a dimension. Read more
Source§fn int_mean_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_mean_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the mean of all elements in the tensor along a dimension. Read more
Source§fn int_cumsum(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_cumsum( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the cumulative sum of elements along a dimension. Read more
Source§fn int_cumprod(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_cumprod( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the cumulative product of elements along a dimension. Read more
Source§fn int_cummin(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_cummin( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn int_cummax(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_cummax( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn int_argmax(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_argmax( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the indices of the maximum elements along a dimension. Read more
Source§fn int_argtopk(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
k: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_argtopk( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, k: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the indices of the k maximum elements along a dimension.
If two elements share the same value, it will be ordered by the lowest
coordinate Read more
Source§fn int_argmin(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_argmin( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Gets the indices of the minimum elements along a dimension. Read more
Source§fn int_clamp(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
min: Scalar,
max: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_clamp( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, min: Scalar, max: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
Source§fn int_abs(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_abs( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Returns a new tensor with absolute values. Read more
Source§fn int_sign(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_sign( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Returns the signs of the int
tensor. Read moreSource§fn int_into_float(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
out_dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn int_into_float( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, out_dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Converts int tensor to float tensor. Read more
Source§fn int_swap_dims(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_swap_dims( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim1: usize, dim2: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Swaps two dimensions of an int tensor. Read more
Source§fn int_repeat_dim(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dim: usize,
times: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_repeat_dim( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dim: usize, times: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Repeats the tensor along the given dimension the given number of times. Read more
Source§fn int_random(
shape: Shape,
distribution: Distribution,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_random( shape: Shape, distribution: Distribution, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Creates a new int tensor with random values. Read more
Source§fn int_permute(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_permute( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn int_expand(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_expand( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Broadcasts the int
tensor to the given shape.Source§fn int_flip(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_flip( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn bitwise_and(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_and( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise AND operation for Int Tensors
Source§fn bitwise_and_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_and_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise AND operation for Int Tensors with a scalar
Source§fn bitwise_or(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_or( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise OR operation for Int Tensors
Source§fn bitwise_or_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_or_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise OR operation for Int Tensors with a scalar
Source§fn bitwise_xor(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_xor( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise XOR operation for Int Tensors
Source§fn bitwise_xor_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_xor_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise XOR operation for Int Tensors with a scalar
Source§fn bitwise_not(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_not( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise NOT operation for Int Tensors
Source§fn bitwise_left_shift(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_left_shift( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise left shift operation for Int Tensors
Source§fn bitwise_left_shift_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_left_shift_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise left shift operation for Int Tensors with a scalar
Source§fn bitwise_right_shift(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_right_shift( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise right shift operation for Int Tensors
Source§fn bitwise_right_shift_scalar(
lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn bitwise_right_shift_scalar( lhs: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Bitwise right shift operation for Int Tensors with a scalar
Source§fn int_cast(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
dtype: IntDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn int_cast( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, dtype: IntDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Converts a tensor to another integer data type. Read more
Source§fn int_unfold(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn int_unfold( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Unfold windows along a dimension. Read more
Source§fn int_cat(
tensors: Vec<<B as BackendTypes>::IntTensorPrimitive>,
dim: usize,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_cat( tensors: Vec<<B as BackendTypes>::IntTensorPrimitive>, dim: usize, ) -> <B as BackendTypes>::IntTensorPrimitive
Concatenates the given tensors along the given dimension. Read more
Source§fn int_not_equal(
lhs: <B as BackendTypes>::IntTensorPrimitive,
rhs: <B as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn int_not_equal( lhs: <B as BackendTypes>::IntTensorPrimitive, rhs: <B as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn int_not_equal_elem(
lhs: <B as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn int_not_equal_elem( lhs: <B as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn int_powi(
lhs: <B as BackendTypes>::IntTensorPrimitive,
rhs: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_powi( lhs: <B as BackendTypes>::IntTensorPrimitive, rhs: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::IntTensorPrimitive
Element-wise power with a IntTensor. Read more
Source§fn int_powi_scalar(
lhs: <B as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_powi_scalar( lhs: <B as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <B as BackendTypes>::IntTensorPrimitive
Element-wise power with a scalar. Read more
Source§fn int_powi_scalar_impl(
lhs: <B as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_powi_scalar_impl( lhs: <B as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <B as BackendTypes>::IntTensorPrimitive
Element-wise power with a scalar. Read more
Source§fn int_clamp_min(
tensor: <B as BackendTypes>::IntTensorPrimitive,
min: Scalar,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_clamp_min( tensor: <B as BackendTypes>::IntTensorPrimitive, min: Scalar, ) -> <B as BackendTypes>::IntTensorPrimitive
Clamps a tensor under a minimum value. Read more
Source§fn int_clamp_max(
tensor: <B as BackendTypes>::IntTensorPrimitive,
max: Scalar,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_clamp_max( tensor: <B as BackendTypes>::IntTensorPrimitive, max: Scalar, ) -> <B as BackendTypes>::IntTensorPrimitive
Clamps a tensor over a maximum value. Read more
Source§fn int_neg(
tensor: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_neg( tensor: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::IntTensorPrimitive
Element-wise negation. Read more
Source§fn int_mean(
tensor: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_mean( tensor: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::IntTensorPrimitive
Computes the mean of all elements in the tensor. Read more
Source§fn int_max_dim_with_indices(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> (<B as BackendTypes>::IntTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn int_max_dim_with_indices( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> (<B as BackendTypes>::IntTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the maximum elements and corresponding indices along a dimension. Read more
Source§fn int_min_dim_with_indices(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> (<B as BackendTypes>::IntTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn int_min_dim_with_indices( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> (<B as BackendTypes>::IntTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the minimum elements and corresponding indices along a dimension. Read more
Source§fn int_transpose(
tensor: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_transpose( tensor: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::IntTensorPrimitive
Transposes an int tensor. Read more
Source§fn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as BackendTypes>::Device,
dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_arange_step( range: Range<i64>, step: usize, device: &<B as BackendTypes>::Device, dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Creates a new tensor with values from the given range with the given step size. Read more
Source§fn int_arange(
range: Range<i64>,
device: &<B as BackendTypes>::Device,
dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_arange( range: Range<i64>, device: &<B as BackendTypes>::Device, dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Creates a new tensor with values from the given range. Read more
Source§fn int_any(
tensor: <B as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn int_any( tensor: <B as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if any element in the int
tensor evaluates to True. Read moreSource§fn int_any_dim(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn int_any_dim( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn int_all(
tensor: <B as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn int_all( tensor: <B as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the int
tensor evaluate to True. Read moreSource§fn int_all_dim(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn int_all_dim( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn int_sort(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_sort( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, descending: bool, ) -> <B as BackendTypes>::IntTensorPrimitive
Sort the elements of the input
tensor by value along a given dimension. Read moreSource§fn int_sort_with_indices(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as BackendTypes>::IntTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn int_sort_with_indices( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, descending: bool, ) -> (<B as BackendTypes>::IntTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Sort the elements of the input
tensor by value along a given dimension. Read moreSource§fn int_argsort(
tensor: <B as BackendTypes>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_argsort( tensor: <B as BackendTypes>::IntTensorPrimitive, dim: usize, descending: bool, ) -> <B as BackendTypes>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor by value
along a given dimension. Read moreSource§impl<R, F, I, BT> ModuleOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> ModuleOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§fn exponential_relu_native(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
alpha: f64,
continuous: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn exponential_relu_native( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, alpha: f64, continuous: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Working-storage ELU, or CELU when continuous is true, using the original alpha.
Source§fn exponential_relu_native_backward(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
alpha: f64,
continuous: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn exponential_relu_native_backward( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, alpha: f64, continuous: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Original selected ELU/CELU mode’s independent first-order input derivative.
Source§fn leaky_relu_native(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
negative_slope: f64,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn leaky_relu_native( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, negative_slope: f64, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Working-storage LeakyReLU using the actual scalar negative slope.
Source§fn leaky_relu_native_backward(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
negative_slope: f64,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn leaky_relu_native_backward( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, negative_slope: f64, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Independent first-order VJP, using the original primal to select the branch.
Source§fn prelu_native(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
alpha: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn prelu_native( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, alpha: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Working-storage PReLU with the original shared or per-channel slope vector.
Source§fn prelu_native_backward_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
alpha: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: [bool; 2],
) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 2]
fn prelu_native_backward_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, alpha: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: [bool; 2], ) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 2]
Independently requested original-input and slope derivatives.
Source§fn group_norm_with_stats(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
beta: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
groups: usize,
epsilon: f64,
) -> LayerNormOutput<DeviceBackend<R, F, I, BT>>
fn group_norm_with_stats( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, beta: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, groups: usize, epsilon: f64, ) -> LayerNormOutput<DeviceBackend<R, F, I, BT>>
GroupNorm output and FP32/FP64 saved
[batch, groups] mean/reciprocal deviation.Source§fn group_norm_backward_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mean: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
groups: usize,
mask: [bool; 3],
) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 3]
fn group_norm_backward_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mean: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, groups: usize, mask: [bool; 3], ) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 3]
Only requested original input, actual weight and bias derivatives, in that order.
Source§fn gelu_native(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
approximate: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn gelu_native( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, approximate: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Explicit native GELU preserving the caller’s original erf/tanh approximation choice.
Source§fn gelu_native_backward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
approximate: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn gelu_native_backward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, approximate: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Independent first-order GELU VJP in the same selected erf/tanh mode.
Source§fn silu_native(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn silu_native( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Explicit native SiLU training path, using FP32 for half activation arithmetic.
Source§fn silu_native_backward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn silu_native_backward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Independent first-order SiLU VJP, retaining the original input storage.
Source§fn softmax_with_stats(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
logarithmic: bool,
) -> SoftmaxOutput<DeviceBackend<R, F, I, BT>>
fn softmax_with_stats( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, logarithmic: bool, ) -> SoftmaxOutput<DeviceBackend<R, F, I, BT>>
Softmax/log-softmax retaining its working output, with FP32 low-precision arithmetic.
Source§fn softmax_native_backward(
working: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
logarithmic: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn softmax_native_backward( working: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, logarithmic: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
VJP from the saved working output, retaining FP64 if either argument uses FP64.
Source§fn has_layer_norm_backward() -> bool
fn has_layer_norm_backward() -> bool
Whether native forward statistics and complete first-order backward are available.
Source§fn layer_norm_backward_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mean: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: [bool; 3],
) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 3]
fn layer_norm_backward_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mean: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: [bool; 3], ) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 3]
LayerNorm input, weight and bias gradients selected in that order.
Source§fn has_rms_norm_backward() -> bool
fn has_rms_norm_backward() -> bool
Whether saved RMSNorm statistics and complete first-order backward are available.
Source§fn rms_norm_backward_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: [bool; 2],
) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 2]
fn rms_norm_backward_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: [bool; 2], ) -> [Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>; 2]
RMSNorm input and weight gradients selected by the two corresponding mask entries.
Source§fn rms_norm_with_stats(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
epsilon: f64,
) -> RmsNormOutput<DeviceBackend<R, F, I, BT>>
fn rms_norm_with_stats( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, epsilon: f64, ) -> RmsNormOutput<DeviceBackend<R, F, I, BT>>
RMSNorm forward retaining reciprocal row norms for backward.
Source§fn rms_norm_backward(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> RmsNormBackward<DeviceBackend<R, F, I, BT>>
fn rms_norm_backward( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> RmsNormBackward<DeviceBackend<R, F, I, BT>>
RMSNorm derivatives from saved reciprocal row norms, without repeating forward.
Source§fn layer_norm(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
beta: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
epsilon: f64,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn layer_norm( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, beta: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, epsilon: f64, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Applies Layer Normalization over the last dimension of the input tensor. Read more
Source§fn layer_norm_with_stats(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
beta: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
epsilon: f64,
) -> LayerNormOutput<DeviceBackend<R, F, I, BT>>
fn layer_norm_with_stats( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, beta: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, epsilon: f64, ) -> LayerNormOutput<DeviceBackend<R, F, I, BT>>
Native forward with statistics retained for backward.
Source§fn layer_norm_backward(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mean: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> LayerNormBackward<DeviceBackend<R, F, I, BT>>
fn layer_norm_backward( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gamma: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mean: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, rstd: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> LayerNormBackward<DeviceBackend<R, F, I, BT>>
Native backward using the exact statistics returned by forward.
Source§fn conv1d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: ConvOptions<1>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv1d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: ConvOptions<1>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
One dimensional convolution. Read more
Source§fn conv1d_x_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv1d_x_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
x.Source§fn conv1d_weight_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv1d_weight_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
weight.Source§fn conv2d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: ConvOptions<2>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv2d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: ConvOptions<2>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Two dimensional convolution. Read more
Source§fn conv2d_x_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv2d_x_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
x.Source§fn conv2d_weight_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv2d_weight_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
weight.Source§fn deform_conv2d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
offset: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: DeformConvOptions<2>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn deform_conv2d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, offset: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: DeformConvOptions<2>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Two dimensional deformable convolution. Read more
Source§fn deform_conv2d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
offset: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: DeformConvOptions<2>,
) -> DeformConv2dBackward<DeviceBackend<R, F, I, BT>>
fn deform_conv2d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, offset: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: DeformConvOptions<2>, ) -> DeformConv2dBackward<DeviceBackend<R, F, I, BT>>
Backward pass for the deform_conv2d operation.
Source§fn conv3d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: ConvOptions<3>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv3d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: ConvOptions<3>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Three dimensional convolution. Read more
Source§fn conv3d_x_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv3d_x_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
x.Source§fn conv3d_weight_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv3d_weight_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
weight.Source§fn conv_transpose2d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: ConvTransposeOptions<2>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv_transpose2d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: ConvTransposeOptions<2>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Two dimensional transposed convolution. Read more
Source§fn conv_transpose3d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: ConvTransposeOptions<3>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn conv_transpose3d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weight: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: ConvTransposeOptions<3>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Three dimensional transposed convolution. Read more
Source§fn avg_pool2d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
ceil_mode: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn avg_pool2d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ceil_mode: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Two dimensional avg pooling. Read more
Source§fn avg_pool2d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
ceil_mode: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn avg_pool2d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ceil_mode: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the avg pooling 2d operation.
Source§fn max_pool2d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
ceil_mode: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn max_pool2d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ceil_mode: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Two dimensional max pooling. Read more
Source§fn max_pool2d_with_indices(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
ceil_mode: bool,
) -> MaxPool2dWithIndices<DeviceBackend<R, F, I, BT>>
fn max_pool2d_with_indices( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ceil_mode: bool, ) -> MaxPool2dWithIndices<DeviceBackend<R, F, I, BT>>
Two dimensional max pooling with indices. Read more
Source§fn max_pool2d_with_indices_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
ceil_mode: bool,
output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> MaxPool2dBackward<DeviceBackend<R, F, I, BT>>
fn max_pool2d_with_indices_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ceil_mode: bool, output_grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> MaxPool2dBackward<DeviceBackend<R, F, I, BT>>
Backward pass for the max pooling 2d operation.
Source§fn adaptive_avg_pool2d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool2d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Two dimensional adaptive avg pooling. Read more
Source§fn adaptive_avg_pool3d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 3],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool3d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 3], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Three dimensional adaptive average pooling of
[batch, channels, depth, height, width].Source§fn max_pool3d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
dilation: [usize; 3],
ceil: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn max_pool3d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], dilation: [usize; 3], ceil: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Three dimensional maximum pooling with native padding, stride and dilation.
Source§fn max_pool3d_with_indices(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
dilation: [usize; 3],
ceil: bool,
) -> MaxPool3dWithIndices<DeviceBackend<R, F, I, BT>>
fn max_pool3d_with_indices( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], dilation: [usize; 3], ceil: bool, ) -> MaxPool3dWithIndices<DeviceBackend<R, F, I, BT>>
Volume maxima and original input positions.
Source§fn max_pool3d_with_indices_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
dilation: [usize; 3],
ceil: bool,
) -> MaxPool3dBackward<DeviceBackend<R, F, I, BT>>
fn max_pool3d_with_indices_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], dilation: [usize; 3], ceil: bool, ) -> MaxPool3dBackward<DeviceBackend<R, F, I, BT>>
Accumulate volume gradients through the saved maximum positions.
Source§fn avg_pool3d_native_output_size(
input: [usize; 3],
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
ceil: bool,
) -> Option<[usize; 3]>
fn avg_pool3d_native_output_size( input: [usize; 3], kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], ceil: bool, ) -> Option<[usize; 3]>
Native volume output geometry, or
None to retain the backend’s composed operations.Source§fn avg_pool3d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
include_pad: bool,
ceil: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn avg_pool3d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], include_pad: bool, ceil: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Three dimensional average pooling of
[batch, channels, depth, height, width].Source§fn avg_pool3d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
kernel: [usize; 3],
stride: [usize; 3],
padding: [usize; 3],
include_pad: bool,
ceil: bool,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn avg_pool3d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, kernel: [usize; 3], stride: [usize; 3], padding: [usize; 3], include_pad: bool, ceil: bool, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Input gradients for three dimensional average pooling.
Source§fn adaptive_avg_pool3d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool3d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Input gradients for native three dimensional adaptive average pooling.
Source§fn adaptive_avg_pool2d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool2d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 2d operation.
Source§fn interpolate(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn interpolate( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], options: InterpolateOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Down/up samples the input. Read more
Source§fn interpolate_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn interpolate_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], options: InterpolateOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward pass for the interpolate operation.
Source§fn interpolate1d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
size: usize,
options: InterpolateOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn interpolate1d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, size: usize, options: InterpolateOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Resize native
[batch, channels, width] lines with the original filter.Source§fn interpolate1d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
size: usize,
options: InterpolateOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn interpolate1d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, size: usize, options: InterpolateOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward line resizing in the original input geometry and storage.
Source§fn interpolate3d(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
size: [usize; 3],
options: InterpolateOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn interpolate3d( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, size: [usize; 3], options: InterpolateOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Resize native volumes using the existing spatial-then-depth filter sequence.
Source§fn interpolate3d_backward(
x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
size: [usize; 3],
options: InterpolateOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn interpolate3d_backward( x: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, grad: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, size: [usize; 3], options: InterpolateOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Backward volume resizing through the original spatial and depth filters.
Source§fn attention(
query: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
key: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
mask: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive>,
attn_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: AttentionModuleOptions,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn attention( query: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, key: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, value: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, mask: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::BoolTensorPrimitive>, attn_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: AttentionModuleOptions, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes scaled dot-product attention: softmax(QKᵗ * scale) · V,
where scale defaults to 1/sqrt(head_dim). Optionally applies masking,
additive bias, causal masking, and softcap to the attention scores. Read more
Source§fn has_ctc_loss_backward() -> bool
fn has_ctc_loss_backward() -> bool
Source§fn ctc_loss(
log_probs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
targets: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
input_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
target_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
blank: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn ctc_loss( log_probs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, targets: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, input_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, target_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, blank: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Computes the Connectionist Temporal Classification (CTC) loss. Read more
Source§fn ctc_loss_backward(
log_probs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
targets: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
input_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
target_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
grad_loss: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
blank: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn ctc_loss_backward( log_probs: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, targets: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, input_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, target_lengths: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, grad_loss: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, blank: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Source§fn rfft(
signal: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
n: Option<usize>,
) -> (<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive)
fn rfft( signal: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, n: Option<usize>, ) -> (<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive)
Real-valued FFT with optional size parameter. Read more
Source§fn irfft(
spectrum_re: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
spectrum_im: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
dim: usize,
n: Option<usize>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn irfft( spectrum_re: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, spectrum_im: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, dim: usize, n: Option<usize>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Inverse real-valued FFT with optional output size. Read more
Source§fn group_norm(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
gamma: Option<<B as BackendTypes>::FloatTensorPrimitive>,
beta: Option<<B as BackendTypes>::FloatTensorPrimitive>,
groups: usize,
epsilon: f64,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn group_norm( tensor: <B as BackendTypes>::FloatTensorPrimitive, gamma: Option<<B as BackendTypes>::FloatTensorPrimitive>, beta: Option<<B as BackendTypes>::FloatTensorPrimitive>, groups: usize, epsilon: f64, ) -> <B as BackendTypes>::FloatTensorPrimitive
Native GroupNorm on actual channel groups with independently optional affine leaves.
Source§fn softmax_native(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
dim: usize,
logarithmic: bool,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn softmax_native( tensor: <B as BackendTypes>::FloatTensorPrimitive, dim: usize, logarithmic: bool, ) -> <B as BackendTypes>::FloatTensorPrimitive
Explicit saved-working-output softmax path; existing activation defaults are unchanged.
Source§fn embedding(
weights: <B as BackendTypes>::FloatTensorPrimitive,
indices: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn embedding( weights: <B as BackendTypes>::FloatTensorPrimitive, indices: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Embedding operation. Read more
Source§fn embedding_backward(
weights: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
indices: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn embedding_backward( weights: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, indices: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Embedding backward operation. Read more
Source§fn linear(
x: <B as BackendTypes>::FloatTensorPrimitive,
weight: <B as BackendTypes>::FloatTensorPrimitive,
bias: Option<<B as BackendTypes>::FloatTensorPrimitive>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn linear( x: <B as BackendTypes>::FloatTensorPrimitive, weight: <B as BackendTypes>::FloatTensorPrimitive, bias: Option<<B as BackendTypes>::FloatTensorPrimitive>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Linear transformation. Read more
Source§fn linear_x_backward(
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn linear_x_backward( weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for linear, returning the gradient for
x.Source§fn linear_weight_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn linear_weight_backward( x: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for linear, returning the gradient for
weight.Source§fn linear_bias_backward(
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn linear_bias_backward( output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for linear, returning the gradient for
bias.Source§fn conv1d_bias_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
bias: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv1d_bias_backward( x: <B as BackendTypes>::FloatTensorPrimitive, bias: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
bias.Source§fn conv2d_bias_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
bias: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv2d_bias_backward( x: <B as BackendTypes>::FloatTensorPrimitive, bias: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
bias.Source§fn conv3d_bias_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
bias: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv3d_bias_backward( x: <B as BackendTypes>::FloatTensorPrimitive, bias: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
bias.Source§fn conv_transpose1d(
x: <B as BackendTypes>::FloatTensorPrimitive,
weight: <B as BackendTypes>::FloatTensorPrimitive,
bias: Option<<B as BackendTypes>::FloatTensorPrimitive>,
options: ConvTransposeOptions<1>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose1d( x: <B as BackendTypes>::FloatTensorPrimitive, weight: <B as BackendTypes>::FloatTensorPrimitive, bias: Option<<B as BackendTypes>::FloatTensorPrimitive>, options: ConvTransposeOptions<1>, ) -> <B as BackendTypes>::FloatTensorPrimitive
One dimensional transposed convolution. Read more
Source§fn conv_transpose1d_x_backward(
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose1d_x_backward( weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
x.Source§fn conv_transpose1d_weight_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose1d_weight_backward( x: <B as BackendTypes>::FloatTensorPrimitive, weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
weight.Source§fn conv_transpose1d_bias_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
bias: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose1d_bias_backward( x: <B as BackendTypes>::FloatTensorPrimitive, bias: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
bias.Source§fn conv_transpose2d_x_backward(
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose2d_x_backward( weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
x.Source§fn conv_transpose2d_weight_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose2d_weight_backward( x: <B as BackendTypes>::FloatTensorPrimitive, weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
weight.Source§fn conv_transpose2d_bias_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
bias: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose2d_bias_backward( x: <B as BackendTypes>::FloatTensorPrimitive, bias: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
bias.Source§fn conv_transpose3d_x_backward(
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose3d_x_backward( weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
x.Source§fn conv_transpose3d_weight_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
weight: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose3d_weight_backward( x: <B as BackendTypes>::FloatTensorPrimitive, weight: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
weight.Source§fn conv_transpose3d_bias_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
bias: <B as BackendTypes>::FloatTensorPrimitive,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn conv_transpose3d_bias_backward( x: <B as BackendTypes>::FloatTensorPrimitive, bias: <B as BackendTypes>::FloatTensorPrimitive, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
bias.Source§fn unfold4d(
x: <B as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
options: UnfoldOptions,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn unfold4d( x: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], options: UnfoldOptions, ) -> <B as BackendTypes>::FloatTensorPrimitive
Four-dimensional unfolding. Read more
Source§fn avg_pool1d(
x: <B as BackendTypes>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
ceil_mode: bool,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn avg_pool1d( x: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ceil_mode: bool, ) -> <B as BackendTypes>::FloatTensorPrimitive
One dimensional avg pooling. Read more
Source§fn avg_pool1d_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
grad: <B as BackendTypes>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
ceil_mode: bool,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn avg_pool1d_backward( x: <B as BackendTypes>::FloatTensorPrimitive, grad: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ceil_mode: bool, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the avg pooling 1d operation.
Source§fn adaptive_avg_pool1d(
x: <B as BackendTypes>::FloatTensorPrimitive,
output_size: usize,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool1d( x: <B as BackendTypes>::FloatTensorPrimitive, output_size: usize, ) -> <B as BackendTypes>::FloatTensorPrimitive
One dimensional adaptive avg pooling. Read more
Source§fn adaptive_avg_pool1d_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool1d_backward( x: <B as BackendTypes>::FloatTensorPrimitive, grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 1d operation.
Source§fn max_pool1d(
x: <B as BackendTypes>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
ceil_mode: bool,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn max_pool1d( x: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, ) -> <B as BackendTypes>::FloatTensorPrimitive
One dimensional max pooling. Read more
Source§fn max_pool1d_with_indices(
x: <B as BackendTypes>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
ceil_mode: bool,
) -> MaxPool1dWithIndices<B>
fn max_pool1d_with_indices( x: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, ) -> MaxPool1dWithIndices<B>
One dimensional max pooling with indices. Read more
Source§fn max_pool1d_with_indices_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
ceil_mode: bool,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
indices: <B as BackendTypes>::IntTensorPrimitive,
) -> MaxPool1dBackward<B>
fn max_pool1d_with_indices_backward( x: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, output_grad: <B as BackendTypes>::FloatTensorPrimitive, indices: <B as BackendTypes>::IntTensorPrimitive, ) -> MaxPool1dBackward<B>
Backward pass for the max pooling 1d operation.
Source§fn rms_norm(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
gamma: <B as BackendTypes>::FloatTensorPrimitive,
epsilon: f64,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn rms_norm( tensor: <B as BackendTypes>::FloatTensorPrimitive, gamma: <B as BackendTypes>::FloatTensorPrimitive, epsilon: f64, ) -> <B as BackendTypes>::FloatTensorPrimitive
Last-axis RMSNorm with working arithmetic and one final output-storage cast.
Source§fn layer_norm_default(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
gamma: <B as BackendTypes>::FloatTensorPrimitive,
beta: Option<<B as BackendTypes>::FloatTensorPrimitive>,
epsilon: f64,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn layer_norm_default( tensor: <B as BackendTypes>::FloatTensorPrimitive, gamma: <B as BackendTypes>::FloatTensorPrimitive, beta: Option<<B as BackendTypes>::FloatTensorPrimitive>, epsilon: f64, ) -> <B as BackendTypes>::FloatTensorPrimitive
Differentiable primitive composition for backends without native LayerNorm backward.
Source§impl<R, F, I, BT> MoeDispatchOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> MoeDispatchOps for DeviceBackend<R, F, I, BT>
Source§type MoeDispatchState = NativeMoeDispatchState<R>
type MoeDispatchState = NativeMoeDispatchState<R>
Original valid private native row mappings, with no unchecked imported offsets.
Source§fn moe_dispatch(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
options: MoeOptions,
) -> Result<MoeDispatched<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_dispatch( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, options: MoeOptions, ) -> Result<MoeDispatched<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original selection and continuous weights followed by device COPY dispatch.
Source§fn moe_dispatch_counts(
state: &<DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState,
expert_prefix: &[usize],
) -> Result<Vec<usize>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_dispatch_counts( state: &<DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState, expert_prefix: &[usize], ) -> Result<Vec<usize>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Actual row counts per caller-declared contiguous global expert range.
Reads only expert-prefix coordination metadata, not activation/weight values.
Source§fn moe_dispatch_backward(
state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_dispatch_backward( state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
COPY VJP sums selected expert-row seeds without multiplying routing weights again.
Source§fn moe_dispatch_weights_backward(
state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_dispatch_weights_backward( state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original fixed-selection source-logit VJP of FP32 continuous weights.
Source§fn moe_combine(
state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState,
expert_values: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weights: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
_backward_strategy: MoeCombineGradientStrategy,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_combine( state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState, expert_values: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weights: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, _backward_strategy: MoeCombineGradientStrategy, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original ascending expert-ID combine after actual expert rows have returned to their source.
Source§fn moe_combine_backward(
state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState,
expert_values: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
weights: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
strategy: MoeCombineGradientStrategy,
selection: MoeCombineSelection,
) -> Result<MoeCombineBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_combine_backward( state: <DeviceBackend<R, F, I, BT> as MoeDispatchOps>::MoeDispatchState, expert_values: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, weights: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, strategy: MoeCombineGradientStrategy, selection: MoeCombineSelection, ) -> Result<MoeCombineBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original combine kernels with only requested actual expert/weight derivatives.
Source§impl<R, F, I, BT> MoeOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> MoeOps for DeviceBackend<R, F, I, BT>
Source§type MoeState = NativeMoeState<R>
type MoeState = NativeMoeState<R>
Actual opaque forward/dispatch state; contains original native handles, not host model copies.
Source§fn moe_selected_weights(
logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
options: MoeRouterWeightOptions,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_selected_weights( logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, options: MoeRouterWeightOptions, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
FP32 continuous weights for explicitly supplied integer selections. Invalid
indices retain the original bounds-safe whole-row NaN semantics.
Source§fn moe_selected_weights_backward(
logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: MoeRouterWeightOptions,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_selected_weights_backward( logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: MoeRouterWeightOptions, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original source-logits storage VJP for fixed selections; gradient weights are FP32.
Source§fn moe_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
correction_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: MoeOptions,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState), <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, correction_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: MoeOptions, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState), <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original top-k/group selection -> FP32 continuous weights -> native dispatch
-> original SwiGLU experts -> ordered combine. No tokens are capacity-dropped.
Source§fn moe_forward_selected(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
correction_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: MoeOptions,
selection: MoeGradientSelection,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState), <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_forward_selected( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, correction_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: MoeOptions, selection: MoeGradientSelection, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState), <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Same original forward with an explicit backward-output requirement. A native
implementation may omit expert activation caches when no expert/input VJP is
required. Requesting an unavailable expert VJP from that state must error.
The compatibility default retains the original complete forward state.
Source§fn moe_inference(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
correction_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>,
gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: MoeOptions,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_inference( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, logits: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, correction_bias: Option<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive>, gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: MoeOptions, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Same original continuous weight policy and native expert output, without retained backward caches.
Source§fn moe_route_indices(
state: &<DeviceBackend<R, F, I, BT> as MoeOps>::MoeState,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
fn moe_route_indices( state: &<DeviceBackend<R, F, I, BT> as MoeOps>::MoeState, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive
Actual original discrete U32 expert IDs, with no host readback or differentiable selection claim.
Source§fn moe_backward(
state: <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<MoeBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_backward( state: <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<MoeBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original first-order input/logits/expert derivatives. Expert gradients retain
native FP32 accumulation/output; ordinary AD casts them at the parent-storage boundary.
Source§fn moe_backward_selected(
state: <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
selection: MoeGradientSelection,
) -> Result<MoeBackwardSelected<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_backward_selected( state: <DeviceBackend<R, F, I, BT> as MoeOps>::MoeState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, selection: MoeGradientSelection, ) -> Result<MoeBackwardSelected<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Explicit requested VJP outputs. Device implementations can omit unneeded native launches
and allocations; the compatibility default retains exact full-backward behavior.
Source§impl<R, F, I, BT> MoeReceivedOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> MoeReceivedOps for DeviceBackend<R, F, I, BT>
Source§type MoeReceivedState = NativeMoeReceivedState<R>
type MoeReceivedState = NativeMoeReceivedState<R>
Private actual validated grouping, inverse permutation and original expert VJP cache.
Source§fn moe_received_forward(
input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
options: MoeReceivedOptions,
selection: MoeReceivedSelection,
) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeReceivedOps>::MoeReceivedState), <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_received_forward( input: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, global_ids: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, down: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, options: MoeReceivedOptions, selection: MoeReceivedSelection, ) -> Result<(<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as MoeReceivedOps>::MoeReceivedState), <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Sort received U32 assignments locally, execute original experts and restore receive order.
Empty expert owners participate with real empty local cubes and zero received rows.
Source§fn moe_received_backward(
state: <DeviceBackend<R, F, I, BT> as MoeReceivedOps>::MoeReceivedState,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
selection: MoeReceivedSelection,
) -> Result<MoeReceivedBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
fn moe_received_backward( state: <DeviceBackend<R, F, I, BT> as MoeReceivedOps>::MoeReceivedState, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, selection: MoeReceivedSelection, ) -> Result<MoeReceivedBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as MoeOps>::MoeError>
Original expert VJP and inverse COPY mapping; local cube gradients retain FP32.
Source§fn moe_received_inference(
input: Self::FloatTensorPrimitive,
global_ids: Self::IntTensorPrimitive,
gate: Self::FloatTensorPrimitive,
up: Self::FloatTensorPrimitive,
down: Self::FloatTensorPrimitive,
options: MoeReceivedOptions,
) -> Result<Self::FloatTensorPrimitive, Self::MoeError>
fn moe_received_inference( input: Self::FloatTensorPrimitive, global_ids: Self::IntTensorPrimitive, gate: Self::FloatTensorPrimitive, up: Self::FloatTensorPrimitive, down: Self::FloatTensorPrimitive, options: MoeReceivedOptions, ) -> Result<Self::FloatTensorPrimitive, Self::MoeError>
Same original values without retained caches unless actual AD parents require derivatives.
Source§impl<R, F, I, BT> NativeSwiGluOps for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> NativeSwiGluOps for DeviceBackend<R, F, I, BT>
Source§type SwiGluError = MoeError
type SwiGluError = MoeError
Original native activation or first-order differentiation failure.
Source§fn native_swiglu(
gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as NativeSwiGluOps>::SwiGluError>
fn native_swiglu( gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, ) -> Result<<DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, <DeviceBackend<R, F, I, BT> as NativeSwiGluOps>::SwiGluError>
Round stored SiLU before multiplication, retaining original activation storage and geometry.
Source§fn native_swiglu_backward(
gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
selection: NativeSwiGluSelection,
) -> Result<NativeSwiGluBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as NativeSwiGluOps>::SwiGluError>
fn native_swiglu_backward( gate: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, up: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, gradient: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, selection: NativeSwiGluSelection, ) -> Result<NativeSwiGluBackward<DeviceBackend<R, F, I, BT>>, <DeviceBackend<R, F, I, BT> as NativeSwiGluOps>::SwiGluError>
Actual original selected first-order input VJPs, including intermediate storage rounding.
Source§impl<R, F, I, BT> QTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> QTensorOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§fn q_from_data(
data: TensorData,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_from_data( data: TensorData, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Creates a new tensor from the data structure. Read more
Source§fn quantize(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive,
scheme: &QuantScheme,
qparams: QuantizationParametersPrimitive<DeviceBackend<R, F, I, BT>>,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn quantize( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive, scheme: &QuantScheme, qparams: QuantizationParametersPrimitive<DeviceBackend<R, F, I, BT>>, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Convert the tensor to a lower precision data type based on the quantization scheme and parameters.
Source§fn dequantize(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
dtype: FloatDType,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
fn dequantize( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, dtype: FloatDType, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::FloatTensorPrimitive
Convert the tensor back to a higher precision data type.
Source§fn q_device(
tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
fn q_device( tensor: &<DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::Device
Gets the device of the tensor. Read more
Source§fn q_to_device(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_to_device( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, device: &<DeviceBackend<R, F, I, BT> as BackendTypes>::Device, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Moves the tensor to the given device. Read more
Source§fn q_reshape(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_reshape( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Reshapes a tensor. Read more
Source§async fn q_into_data(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn q_into_data( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn q_swap_dims(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_swap_dims( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, dim1: usize, dim2: usize, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Swaps two dimensions of a tensor. Read more
Source§fn q_permute(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_permute( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn q_flip(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_flip( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, axes: &[usize], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn q_gather(
dim: usize,
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_gather( dim: usize, tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Gather elements from a tensor. Read more
Source§fn q_select(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_select( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, dim: usize, indices: <DeviceBackend<R, F, I, BT> as BackendTypes>::IntTensorPrimitive, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
Source§fn q_slice(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
slices: &[Slice],
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_slice( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, slices: &[Slice], ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Select tensor elements corresponding to the given slices. Read more
Source§fn q_expand(
tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive,
shape: Shape,
) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
fn q_expand( tensor: <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive, shape: Shape, ) -> <DeviceBackend<R, F, I, BT> as BackendTypes>::QuantizedTensorPrimitive
Broadcasts the
tensor to the given shape.Source§fn q_matmul(
lhs: TensorPrimitive<DeviceBackend<R, F, I, BT>>,
rhs: TensorPrimitive<DeviceBackend<R, F, I, BT>>,
) -> TensorPrimitive<DeviceBackend<R, F, I, BT>>
fn q_matmul( lhs: TensorPrimitive<DeviceBackend<R, F, I, BT>>, rhs: TensorPrimitive<DeviceBackend<R, F, I, BT>>, ) -> TensorPrimitive<DeviceBackend<R, F, I, BT>>
Multiplies two tensors together using matrix multiplication. Read more
Source§fn quantize_dynamic(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
scheme: &QuantScheme,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn quantize_dynamic( tensor: <B as BackendTypes>::FloatTensorPrimitive, scheme: &QuantScheme, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Dynamically convert the tensor to a lower precision data type based on the quantization scheme.
Source§fn quantize_dynamic_with_precision(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
scheme: &QuantScheme,
calibration_dtype: FloatDType,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn quantize_dynamic_with_precision( tensor: <B as BackendTypes>::FloatTensorPrimitive, scheme: &QuantScheme, calibration_dtype: FloatDType, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Explicit calibration arithmetic independent of the original input and packed parameter storage.
Quantizes the original input rather than its calibration copy, retaining the selected scheme.
Source§fn q_detach(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_detach( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Detaches a tensor from the computation graph.
Source§fn q_set_require_grad(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
_require_grad: bool,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_set_require_grad( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, _require_grad: bool, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Sets the
require_grad flag of a tensor.Source§fn q_is_require_grad(
_tensor: &<B as BackendTypes>::QuantizedTensorPrimitive,
) -> bool
fn q_is_require_grad( _tensor: &<B as BackendTypes>::QuantizedTensorPrimitive, ) -> bool
Returns the
require_grad flag of a tensor.Source§fn q_transpose(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_transpose( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Transposes a tensor. Read more
Source§fn q_repeat_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
times: usize,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_repeat_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, times: usize, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Repeat the tensor along the given dimension. Read more
Source§fn q_add(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_add( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Adds two tensors together. Read more
Source§fn q_add_scalar(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_add_scalar( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Adds a scalar to a tensor. Read more
Source§fn q_clamp_min(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
min: Scalar,
) -> TensorPrimitive<B>
fn q_clamp_min( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, min: Scalar, ) -> TensorPrimitive<B>
Clamps a tensor under a minimum value. Read more
Source§fn q_clamp_max(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
max: Scalar,
) -> TensorPrimitive<B>
fn q_clamp_max( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, max: Scalar, ) -> TensorPrimitive<B>
Clamps a tensor over a maximum value. Read more
Source§fn q_clamp(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
min: Scalar,
max: Scalar,
) -> TensorPrimitive<B>
fn q_clamp( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, min: Scalar, max: Scalar, ) -> TensorPrimitive<B>
Clamps a tensor between a minimum and maximum value. Read more
Source§fn q_sub(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sub( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Subtracts two tensors. Read more
Source§fn q_sub_scalar(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_sub_scalar( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Subtracts a scalar from a tensor. Read more
Source§fn q_mul(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_mul( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Multiplies two tensors together element-wise.
Source§fn q_mul_scalar(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_mul_scalar( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Multiplies a tensor by a scalar. Read more
Source§fn q_div(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_div( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Divides two tensors element-wise. Read more
Source§fn q_div_scalar(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_div_scalar( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Divides a tensor by a scalar. Read more
Source§fn q_matmul_default(
lhs: TensorPrimitive<B>,
rhs: TensorPrimitive<B>,
) -> TensorPrimitive<B>
fn q_matmul_default( lhs: TensorPrimitive<B>, rhs: TensorPrimitive<B>, ) -> TensorPrimitive<B>
Existing dequantized arithmetic and propagation contract for unsupported native combinations.
Source§fn q_neg(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_neg( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Negates a tensor element-wise.
Source§fn q_recip(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_recip( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Calculates the reciprocals element-wise
Source§fn q_sum(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sum( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Sum of all elements in a tensor. Read more
Source§fn q_sum_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_sum_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Sum of all elements in a tensor along a dimension. Read more
Source§fn q_prod(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_prod( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Product of all elements in a tensor. Read more
Source§fn q_prod_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_prod_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Product of all elements in a tensor along a dimension. Read more
Source§fn q_mean(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_mean( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Mean of all elements in a tensor. Read more
Source§fn q_mean_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_mean_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Mean of all elements in a tensor along a dimension. Read more
Source§fn q_cumsum(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cumsum( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative sum of elements along a dimension. Read more
Source§fn q_cumprod(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cumprod( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative product of elements along a dimension. Read more
Source§fn q_cummin(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cummin( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn q_cummax(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cummax( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn q_exp(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_exp( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with exponential values. Read more
Source§fn q_log(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_log( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with natural logarithm values. Read more
Source§fn q_log1p(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_log1p( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with logarithm values of (1 + Xi). Read more
Source§fn q_powf(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_powf( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Element-wise power with another tensor. Read more
Source§fn q_powi(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: <B as BackendTypes>::IntTensorPrimitive,
) -> TensorPrimitive<B>
fn q_powi( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: <B as BackendTypes>::IntTensorPrimitive, ) -> TensorPrimitive<B>
Element-wise power with an IntTensor. Read more
Source§fn q_powi_scalar(
lhs: <B as BackendTypes>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_powi_scalar( lhs: <B as BackendTypes>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Element-wise power with an int scalar. Read more
Source§fn q_powf_scalar(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
value: Scalar,
) -> TensorPrimitive<B>
fn q_powf_scalar( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, value: Scalar, ) -> TensorPrimitive<B>
Element-wise power with a float scalar. Read more
Source§fn q_sqrt(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sqrt( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with square root values. Read more
Source§fn q_abs(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_abs( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Returns a new tensor with absolute values. Read more
Source§fn q_cos(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_cos( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with cosine values. Read more
Source§fn q_sin(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sin( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with sine values. Read more
Source§fn q_tan(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_tan( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with tangent values. Read more
Source§fn q_cosh(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_cosh( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with hyperbolic cosine values. Read more
Source§fn q_sinh(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sinh( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with hyperbolic sine values. Read more
Source§fn q_tanh(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_tanh( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with hyperbolic tangent values. Read more
Source§fn q_erf(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_erf( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with the error function values. Read more
Source§fn q_cat(
tensors: Vec<<B as BackendTypes>::QuantizedTensorPrimitive>,
dim: usize,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_cat( tensors: Vec<<B as BackendTypes>::QuantizedTensorPrimitive>, dim: usize, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Concatenates tensors along a dimension. Read more
Source§fn q_argmax(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn q_argmax( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
Source§fn q_argtopk(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
k: usize,
out_dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn q_argtopk( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, k: usize, out_dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Gets the indices of the k maximum elements of a tensor along an axis.
If two elements are equals, order them by the lowest indices Read more
Source§fn q_topk(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
k: usize,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_topk( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, k: usize, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the values of the k maximum elements of a tensor along an axis. Read more
Source§fn q_argmin(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn q_argmin( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
Source§fn q_max(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_max( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn q_max_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_max_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
Source§fn q_max_dim_with_indices(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn q_max_dim_with_indices( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis and their indices. Read more
Source§fn q_min(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_min( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the minimum element of a tensor. Read more
Source§fn q_min_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_min_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the minimum elements of a tensor along an axis. Read more
Source§fn q_min_dim_with_indices(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn q_min_dim_with_indices( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
Source§fn q_max_abs(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_max_abs( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn q_max_abs_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_max_abs_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
Source§fn q_any(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn q_any( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if any element in the
tensor evaluates to True. Read moreSource§fn q_any_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn q_any_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn q_all(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn q_all( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the
tensor evaluate to True. Read moreSource§fn q_all_dim(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <B as BackendTypes>::BoolTensorPrimitive
fn q_all_dim( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <B as BackendTypes>::BoolTensorPrimitive
Source§fn q_sort(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_sort( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn q_sort_with_indices(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
out_dtype: IntDType,
) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn q_sort_with_indices( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, descending: bool, out_dtype: IntDType, ) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn q_argsort(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
out_dtype: IntDType,
) -> <B as BackendTypes>::IntTensorPrimitive
fn q_argsort( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, descending: bool, out_dtype: IntDType, ) -> <B as BackendTypes>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor by value along a given dimension. Read moreSource§impl<R, F, I, BT> TransactionOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
impl<R, F, I, BT> TransactionOps<DeviceBackend<R, F, I, BT>> for DeviceBackend<R, F, I, BT>
Source§async fn tr_execute(
transaction: TransactionPrimitive<DeviceBackend<R, F, I, BT>>,
) -> Result<TransactionData, ExecutionError>
async fn tr_execute( transaction: TransactionPrimitive<DeviceBackend<R, F, I, BT>>, ) -> Result<TransactionData, ExecutionError>
Executes a transaction and return its
data.
Auto Trait Implementations§
impl<R, F, I, BT> Freeze for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: Freeze,
PhantomData<F>: Freeze,
PhantomData<I>: Freeze,
PhantomData<BT>: Freeze,
impl<R, F, I, BT> RefUnwindSafe for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: RefUnwindSafe,
PhantomData<F>: RefUnwindSafe,
PhantomData<I>: RefUnwindSafe,
PhantomData<BT>: RefUnwindSafe,
impl<R, F, I, BT> Send for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: Send,
PhantomData<F>: Send,
PhantomData<I>: Send,
PhantomData<BT>: Send,
impl<R, F, I, BT> Sync for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: Sync,
PhantomData<F>: Sync,
PhantomData<I>: Sync,
PhantomData<BT>: Sync,
impl<R, F, I, BT> Unpin for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: Unpin,
PhantomData<F>: Unpin,
PhantomData<I>: Unpin,
PhantomData<BT>: Unpin,
impl<R, F, I, BT> UnsafeUnpin for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: UnsafeUnpin,
PhantomData<F>: UnsafeUnpin,
PhantomData<I>: UnsafeUnpin,
PhantomData<BT>: UnsafeUnpin,
impl<R, F, I, BT> UnwindSafe for DeviceBackend<R, F, I, BT>where
<I as ReducePrecision>::EA: Sized,
<I as ReducePrecision>::EI: Sized,
<<I as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<I as MatmulPrecision>::Acc: Sized,
<<F as MatmulPrecision>::Acc as MatrixPrecision>::Global: Sized,
<F as MatmulPrecision>::Acc: Sized,
PhantomData<R>: UnwindSafe,
PhantomData<F>: UnwindSafe,
PhantomData<I>: UnwindSafe,
PhantomData<BT>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more