pub trait QTensorOps<B>where
B: Backend,{
Show 85 methods
// Required methods
fn q_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::QuantizedTensorPrimitive;
fn quantize(
tensor: <B as Backend>::FloatTensorPrimitive,
scheme: &QuantizationScheme,
qparams: QuantizationParametersPrimitive<B>,
) -> <B as Backend>::QuantizedTensorPrimitive;
fn dequantize(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn q_device(
tensor: &<B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::Device;
fn q_to_device(
tensor: <B as Backend>::QuantizedTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_reshape(
tensor: <B as Backend>::QuantizedTensorPrimitive,
shape: Shape,
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_into_data(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> impl Future<Output = TensorData> + Send + 'static;
fn q_swap_dims(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_permute(
tensor: <B as Backend>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_flip(
tensor: <B as Backend>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_select(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_slice(
tensor: <B as Backend>::QuantizedTensorPrimitive,
ranges: &[Range<usize>],
) -> <B as Backend>::QuantizedTensorPrimitive;
fn q_expand(
tensor: <B as Backend>::QuantizedTensorPrimitive,
shape: Shape,
) -> <B as Backend>::QuantizedTensorPrimitive;
// Provided methods
fn quantize_dynamic(
tensor: <B as Backend>::FloatTensorPrimitive,
scheme: &QuantizationScheme,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_detach(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_set_require_grad(
tensor: <B as Backend>::QuantizedTensorPrimitive,
_require_grad: bool,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_is_require_grad(
_tensor: &<B as Backend>::QuantizedTensorPrimitive,
) -> bool { ... }
fn q_repeat_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_add(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_add_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_clamp_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_clamp_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_clamp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sub(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sub_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_mul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_mul_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_div(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_div_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_remainder(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_remainder_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_matmul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_neg(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_recip(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_transpose(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_gather(
dim: usize,
tensor: <B as Backend>::QuantizedTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_scatter(
dim: usize,
tensor: <B as Backend>::QuantizedTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_select_assign(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_slice_assign(
tensor: <B as Backend>::QuantizedTensorPrimitive,
ranges: &[Range<usize>],
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_mask_where(
tensor: <B as Backend>::QuantizedTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_mask_fill(
tensor: <B as Backend>::QuantizedTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sum(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sum_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_prod(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_prod_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_mean(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_mean_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_exp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_log(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_log1p(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_powf(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_powi(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_powi_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_powf_scalar(
tensor: <B as Backend>::QuantizedTensorPrimitive,
value: f32,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sqrt(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_cos(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_tan(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_cosh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sinh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_tanh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_erf(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_cat(
tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_argmax(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn q_argmin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn q_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_max_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_max_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn q_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_min_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_min_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn q_max_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_max_abs_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_narrow(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_chunk(
tensor: <B as Backend>::QuantizedTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive> { ... }
fn q_split(
tensor: <B as Backend>::QuantizedTensorPrimitive,
split_size: usize,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive> { ... }
fn q_split_with_sizes(
tensor: <B as Backend>::QuantizedTensorPrimitive,
split_sizes: Vec<usize>,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive> { ... }
fn q_any(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn q_any_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn q_all(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn q_all_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn q_sort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::QuantizedTensorPrimitive { ... }
fn q_sort_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn q_argsort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive { ... }
}
Expand description
Quantized Tensor API for basic operations, see tensor for documentation on each function.
Required Methods§
Sourcefn q_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_from_data( data: TensorData, device: &<B as Backend>::Device, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn quantize(
tensor: <B as Backend>::FloatTensorPrimitive,
scheme: &QuantizationScheme,
qparams: QuantizationParametersPrimitive<B>,
) -> <B as Backend>::QuantizedTensorPrimitive
fn quantize( tensor: <B as Backend>::FloatTensorPrimitive, scheme: &QuantizationScheme, qparams: QuantizationParametersPrimitive<B>, ) -> <B as Backend>::QuantizedTensorPrimitive
Convert the tensor to a lower precision data type based on the quantization scheme and parameters.
Sourcefn dequantize(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn dequantize( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Convert the tensor back to a higher precision data type.
Sourcefn q_to_device(
tensor: <B as Backend>::QuantizedTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_to_device( tensor: <B as Backend>::QuantizedTensorPrimitive, device: &<B as Backend>::Device, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_reshape(
tensor: <B as Backend>::QuantizedTensorPrimitive,
shape: Shape,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_reshape( tensor: <B as Backend>::QuantizedTensorPrimitive, shape: Shape, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_into_data(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> impl Future<Output = TensorData> + Send + 'static
fn q_into_data( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> impl Future<Output = TensorData> + Send + 'static
Sourcefn q_swap_dims(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_swap_dims( tensor: <B as Backend>::QuantizedTensorPrimitive, dim1: usize, dim2: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_permute(
tensor: <B as Backend>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_permute( tensor: <B as Backend>::QuantizedTensorPrimitive, axes: &[usize], ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_flip(
tensor: <B as Backend>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_flip( tensor: <B as Backend>::QuantizedTensorPrimitive, axes: &[usize], ) -> <B as Backend>::QuantizedTensorPrimitive
Reverse the order of elements in a tensor along the given axes.
§Arguments
tensor
- The tensor to reverse.axes
- The axes to reverse.
The tensor with the elements reversed.
Sourcefn q_select(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_select( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_slice(
tensor: <B as Backend>::QuantizedTensorPrimitive,
ranges: &[Range<usize>],
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_slice( tensor: <B as Backend>::QuantizedTensorPrimitive, ranges: &[Range<usize>], ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_expand(
tensor: <B as Backend>::QuantizedTensorPrimitive,
shape: Shape,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_expand( tensor: <B as Backend>::QuantizedTensorPrimitive, shape: Shape, ) -> <B as Backend>::QuantizedTensorPrimitive
Broadcasts the tensor
to the given shape
.
Provided Methods§
Sourcefn quantize_dynamic(
tensor: <B as Backend>::FloatTensorPrimitive,
scheme: &QuantizationScheme,
) -> <B as Backend>::QuantizedTensorPrimitive
fn quantize_dynamic( tensor: <B as Backend>::FloatTensorPrimitive, scheme: &QuantizationScheme, ) -> <B as Backend>::QuantizedTensorPrimitive
Dynamically convert the tensor to a lower precision data type based on the quantization scheme.
Sourcefn q_detach(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_detach( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Detaches a tensor from the computation graph.
Sourcefn q_set_require_grad(
tensor: <B as Backend>::QuantizedTensorPrimitive,
_require_grad: bool,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_set_require_grad( tensor: <B as Backend>::QuantizedTensorPrimitive, _require_grad: bool, ) -> <B as Backend>::QuantizedTensorPrimitive
Sets the require_grad
flag of a tensor.
Sourcefn q_is_require_grad(_tensor: &<B as Backend>::QuantizedTensorPrimitive) -> bool
fn q_is_require_grad(_tensor: &<B as Backend>::QuantizedTensorPrimitive) -> bool
Returns the require_grad
flag of a tensor.
Sourcefn q_repeat_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_repeat_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_add(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_add( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_add_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_add_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_clamp_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_clamp_min( tensor: <B as Backend>::QuantizedTensorPrimitive, min: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_clamp_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_clamp_max( tensor: <B as Backend>::QuantizedTensorPrimitive, max: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_clamp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_clamp( tensor: <B as Backend>::QuantizedTensorPrimitive, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sub(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sub( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sub_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sub_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_mul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mul( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Multiplies two tensors together element-wise.
Sourcefn q_mul_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mul_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_div(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_div( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_div_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_div_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_remainder(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_remainder( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_remainder_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_remainder_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_matmul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_matmul( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_neg(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_neg( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Negates a tensor element-wise.
Sourcefn q_recip(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_recip( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Calculates the reciprocals element-wise
Sourcefn q_transpose(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_transpose( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_gather(
dim: usize,
tensor: <B as Backend>::QuantizedTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_gather( dim: usize, tensor: <B as Backend>::QuantizedTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_scatter(
dim: usize,
tensor: <B as Backend>::QuantizedTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_scatter( dim: usize, tensor: <B as Backend>::QuantizedTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_select_assign(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_select_assign( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Assign the selected elements along the given dimension corresponding for the given indices to the given value.
§Arguments
tensor
- The tensor to select from.dim
- The dimension to select from.indices
- The indices to select.value
- The value to assign.
§Returns
The tensor with the selected elements assigned to the given value.
Sourcefn q_slice_assign(
tensor: <B as Backend>::QuantizedTensorPrimitive,
ranges: &[Range<usize>],
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_slice_assign( tensor: <B as Backend>::QuantizedTensorPrimitive, ranges: &[Range<usize>], value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_mask_where(
tensor: <B as Backend>::QuantizedTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mask_where( tensor: <B as Backend>::QuantizedTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Update the given tensor with the value tensor where the mask is true.
§Arguments
tensor
- The tensor to select from.mask
- The boolean mask to select with.value
- The value to assign to the selected elements from the value tensor.
§Returns
The tensor with the selected elements assigned to the given value.
Sourcefn q_mask_fill(
tensor: <B as Backend>::QuantizedTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mask_fill( tensor: <B as Backend>::QuantizedTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sum(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sum( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sum_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sum_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_prod(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_prod( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_prod_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_prod_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_mean(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mean( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_mean_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mean_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_exp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_exp( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_log(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_log( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_log1p(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_log1p( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_powf(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powf( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_powi(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powi( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_powi_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powi_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_powf_scalar(
tensor: <B as Backend>::QuantizedTensorPrimitive,
value: f32,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powf_scalar( tensor: <B as Backend>::QuantizedTensorPrimitive, value: f32, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sqrt(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sqrt( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_abs( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_cos(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_cos( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sin( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_tan(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_tan( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_cosh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_cosh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_sinh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sinh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_tanh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_tanh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_erf(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_erf( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_cat(
tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_cat( tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_argmax(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn q_argmax( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn q_argmin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn q_argmin( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn q_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_max_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_max_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_max_dim_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sourcefn q_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_min( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_min_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_min_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_min_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_min_dim_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sourcefn q_max_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_abs( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_max_abs_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_abs_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sourcefn q_narrow(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_narrow( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range.
§Arguments
dim
- The dimension along which the tensor will be narrowed.start
- The starting point of the given range.length
- The ending point of the given range.
§Panics
- If the dimension is greater than the number of dimensions of the tensor.
- If the given range exceeds the number of elements on the given dimension.
§Returns
A new tensor with the given dimension narrowed to the given range.
Sourcefn q_chunk(
tensor: <B as Backend>::QuantizedTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
fn q_chunk( tensor: <B as Backend>::QuantizedTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
Sourcefn q_split(
tensor: <B as Backend>::QuantizedTensorPrimitive,
split_size: usize,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
fn q_split( tensor: <B as Backend>::QuantizedTensorPrimitive, split_size: usize, dim: usize, ) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
Sourcefn q_split_with_sizes(
tensor: <B as Backend>::QuantizedTensorPrimitive,
split_sizes: Vec<usize>,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
fn q_split_with_sizes( tensor: <B as Backend>::QuantizedTensorPrimitive, split_sizes: Vec<usize>, dim: usize, ) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
Sourcefn q_any(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn q_any( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn q_any_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn q_any_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the float tensor
evaluates to True along a given dimension dim
.
§Arguments
tensor
- The tensor to test.dim
- The axis along which to test.
§Returns
A boolean tensor Tensor<B, D, Bool>
with the same size as input tensor
, except in the dim
axis
where the size is 1. The elem in the dim
axis is True if any element along this dim in the
input evaluates to True, False otherwise.
Sourcefn q_all(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn q_all( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn q_all_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn q_all_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the tensor
evaluate to True along a given dimension dim
.
§Arguments
tensor
- The tensor to test.dim
- The axis along which to test.
§Returns
A boolean tensor Tensor<B, D, Bool>
with the same size as input tensor
, except in the dim
axis
where the size is 1. The elem in the dim
axis is True if all elements along this dim in the input
evaluates to True, False otherwise.
Sourcefn q_sort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sort( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::QuantizedTensorPrimitive
Sort the elements of the input tensor
by value in along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor
- The input tensor.dim
- The axis along which to sort.descending
- The sorting order.
§Returns
A tensor with the same shape as the input tensor, where the elements are sorted by value.
Sourcefn q_sort_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_sort_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input tensor
by value in along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor
- The input tensor.dim
- The axis along which to sort.descending
- The sorting order.
§Returns
A tensor with the same shape as the input tensor and corresponding indices, where the elements are sorted by value and the indices map back to the original input tensor.
Sourcefn q_argsort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn q_argsort( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive
Returns the indices that sort the elements of the input tensor
by value along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor
- The input tensor.dim
- The axis along which to sort.descending
- The sorting order.
§Returns
A tensor with the same shape as the input tensor the indices map back to the original input tensor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.