pub struct CubeBackend;Expand description
Tensor backend that compiles just-in-time for whichever runtime its device names.
Implementations§
Source§impl CubeBackend
impl CubeBackend
Sourcepub fn new() -> CubeBackend
pub fn new() -> CubeBackend
Constructs a new CubeBackend.
Trait Implementations§
Source§impl ActivationOps<CubeBackend> for CubeBackend
impl ActivationOps<CubeBackend> for CubeBackend
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 Backend for CubeBackend
impl Backend for CubeBackend
Source§fn profile_abandon(
device: &<CubeBackend as BackendTypes>::Device,
token: ProfileToken,
)
fn profile_abandon( device: &<CubeBackend as BackendTypes>::Device, token: ProfileToken, )
Dropped on the stream it was opened on, without recording an end — cubecl returns the start event to its pool and nothing is measured.
Source§fn name(device: &<CubeBackend as BackendTypes>::Device) -> String
fn name(device: &<CubeBackend as BackendTypes>::Device) -> String
Name of the backend.
Source§fn seed(_device: &<CubeBackend as BackendTypes>::Device, seed: u64)
fn seed(_device: &<CubeBackend as BackendTypes>::Device, seed: u64)
Seeds the backend on the specified device. Read more
Source§fn ad_enabled(_device: &<CubeBackend as BackendTypes>::Device) -> bool
fn ad_enabled(_device: &<CubeBackend as BackendTypes>::Device) -> bool
If autodiff is enabled.
Source§fn sync(
device: &<CubeBackend as BackendTypes>::Device,
) -> Result<(), ExecutionError>
fn sync( device: &<CubeBackend as BackendTypes>::Device, ) -> Result<(), ExecutionError>
Sync the backend, ensure that all computation are finished.
Source§fn profile<O>(
device: &<CubeBackend as BackendTypes>::Device,
options: ProfileOptions,
func: impl FnOnce() -> O + Send,
) -> Result<(O, ProfileDuration), ExecutionError>where
O: Send + 'static,
fn profile<O>(
device: &<CubeBackend as BackendTypes>::Device,
options: ProfileOptions,
func: impl FnOnce() -> O + Send,
) -> Result<(O, ProfileDuration), ExecutionError>where
O: Send + 'static,
Measure how long the device spends on the work
func puts on the
calling stream, in device time. Read moreSource§fn profile_start(
device: &<CubeBackend as BackendTypes>::Device,
) -> Result<Option<ProfileToken>, ExecutionError>
fn profile_start( device: &<CubeBackend as BackendTypes>::Device, ) -> Result<Option<ProfileToken>, ExecutionError>
Open a profiling window at the calling stream’s
current position, to be closed with
profile_end from the same stream. Read moreSource§fn profile_end(
device: &<CubeBackend as BackendTypes>::Device,
token: ProfileToken,
_options: ProfileOptions,
) -> Result<ProfileDuration, ExecutionError>
fn profile_end( device: &<CubeBackend as BackendTypes>::Device, token: ProfileToken, _options: ProfileOptions, ) -> Result<ProfileDuration, ExecutionError>
Close the window
token at the calling stream’s current position. Read moreSource§fn graph_prepare(
device: &<CubeBackend as BackendTypes>::Device,
) -> Result<(), ExecutionError>
fn graph_prepare( device: &<CubeBackend as BackendTypes>::Device, ) -> Result<(), ExecutionError>
Prepare
device for an upcoming graph capture: route allocations into a
stable pool so every buffer allocated before graph_stop_capture can
be pinned. Call before the warmup run. No-op by default. Read moreSource§fn graph_start_capture(
device: &<CubeBackend as BackendTypes>::Device,
) -> Result<(), ExecutionError>
fn graph_start_capture( device: &<CubeBackend as BackendTypes>::Device, ) -> Result<(), ExecutionError>
Begin recording launches on
device into a graph (see
graph_stop_capture). Errors on backends
without hardware graph support, so callers fall back to re-running.Source§fn graph_stop_capture(
device: &<CubeBackend as BackendTypes>::Device,
) -> Result<<CubeBackend as BackendTypes>::GraphPrimitive, ExecutionError>
fn graph_stop_capture( device: &<CubeBackend as BackendTypes>::Device, ) -> Result<<CubeBackend as BackendTypes>::GraphPrimitive, ExecutionError>
Stop recording and return the captured graph,
ready to
graph_replay.Source§unsafe fn graph_replay(
device: &<CubeBackend as BackendTypes>::Device,
graph: &<CubeBackend as BackendTypes>::GraphPrimitive,
) -> Result<(), ExecutionError>
unsafe fn graph_replay( device: &<CubeBackend as BackendTypes>::Device, graph: &<CubeBackend as BackendTypes>::GraphPrimitive, ) -> Result<(), ExecutionError>
Source§fn memory_persistent_allocations<Output, Input, Func>(
device: &<CubeBackend as BackendTypes>::Device,
input: Input,
func: Func,
) -> Output
fn memory_persistent_allocations<Output, Input, Func>( device: &<CubeBackend as BackendTypes>::Device, input: Input, func: Func, ) -> Output
Sets the current allocation mode to persistent.
Source§fn memory_cleanup(device: &<CubeBackend as BackendTypes>::Device)
fn memory_cleanup(device: &<CubeBackend as BackendTypes>::Device)
Manually triggers a memory cleanup on the given device.
Source§fn memory_pool_report(
device: &<CubeBackend as BackendTypes>::Device,
) -> Option<Vec<SlicedPoolReport>>
fn memory_pool_report( device: &<CubeBackend as BackendTypes>::Device, ) -> Option<Vec<SlicedPoolReport>>
The dynamic pools’ measured state, in the order allocations are routed
through them.
None on a backend that does not report one, or whose
stream has failed. Read moreSource§fn memory_pool_usage(
device: &<CubeBackend as BackendTypes>::Device,
) -> Option<MemoryPoolUsage>
fn memory_pool_usage( device: &<CubeBackend as BackendTypes>::Device, ) -> Option<MemoryPoolUsage>
The device allocator’s current state.
None on a backend that does not
report one, or whose stream has failed.Source§fn staging<'a, Iter>(data: Iter, device: &<CubeBackend as BackendTypes>::Device)where
Iter: Iterator<Item = &'a mut TensorData>,
fn staging<'a, Iter>(data: Iter, device: &<CubeBackend 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: &<CubeBackend as BackendTypes>::Device,
dtype: DType,
) -> bool
fn supports_dtype( device: &<CubeBackend 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: &<CubeBackend as BackendTypes>::Device,
dtype: DType,
) -> EnumSet<DTypeUsage>
fn dtype_usage( device: &<CubeBackend 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§fn flush(
device: &<CubeBackend as BackendTypes>::Device,
) -> Result<(), ExecutionError>
fn flush( device: &<CubeBackend as BackendTypes>::Device, ) -> Result<(), ExecutionError>
Flush any pending operation of the backend. Read more
Source§impl BackendIr for CubeBackend
impl BackendIr for CubeBackend
Source§type Handle = CubeFusionHandle
type Handle = CubeFusionHandle
The type that can be used to point to a tensor of any kind.
Source§fn float_tensor(
handle: TensorHandle<<CubeBackend as BackendIr>::Handle>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_tensor( handle: TensorHandle<<CubeBackend as BackendIr>::Handle>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Convert a handle to a float tensor.
Source§fn int_tensor(
handle: TensorHandle<<CubeBackend as BackendIr>::Handle>,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_tensor( handle: TensorHandle<<CubeBackend as BackendIr>::Handle>, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Convert a handle to an int tensor.
Source§fn bool_tensor(
handle: TensorHandle<<CubeBackend as BackendIr>::Handle>,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_tensor( handle: TensorHandle<<CubeBackend as BackendIr>::Handle>, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Convert a handle to a bool tensor.
Source§fn quantized_tensor(
handle: TensorHandle<<CubeBackend as BackendIr>::Handle>,
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn quantized_tensor( handle: TensorHandle<<CubeBackend as BackendIr>::Handle>, ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Convert a handle to a quantized tensor.
Source§fn float_tensor_handle(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendIr>::Handle
fn float_tensor_handle( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendIr>::Handle
Convert a float tensor to a handle.
Source§fn int_tensor_handle(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendIr>::Handle
fn int_tensor_handle( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendIr>::Handle
Convert an int tensor to a handle.
Source§fn bool_tensor_handle(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendIr>::Handle
fn bool_tensor_handle( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendIr>::Handle
Convert a bool tensor to a handle.
Source§fn quantized_tensor_handle(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
) -> <CubeBackend as BackendIr>::Handle
fn quantized_tensor_handle( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, ) -> <CubeBackend as BackendIr>::Handle
Convert a quantized tensor to a handle.
Source§impl BackendTypes for CubeBackend
impl BackendTypes for CubeBackend
Source§type FloatTensorPrimitive = CubeTensor
type FloatTensorPrimitive = CubeTensor
Tensor primitive to be used for all float operations.
Source§type IntTensorPrimitive = CubeTensor
type IntTensorPrimitive = CubeTensor
Tensor primitive to be used for all int operations.
Source§type BoolTensorPrimitive = CubeTensor
type BoolTensorPrimitive = CubeTensor
Tensor primitive to be used for all bool operations.
Source§type QuantizedTensorPrimitive = CubeTensor
type QuantizedTensorPrimitive = CubeTensor
Tensor primitive to be used for all quantized operations.
Source§type GraphPrimitive = CubeGraph
type GraphPrimitive = CubeGraph
Captured graph primitive returned by
Backend::graph_stop_capture and
consumed by Backend::graph_replay: a backend-owned recording of a
launch sequence that replays as a single dispatch. Read moreSource§impl BoolTensorOps<CubeBackend> for CubeBackend
impl BoolTensorOps<CubeBackend> for CubeBackend
Source§fn bool_empty(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_empty( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Creates a new bool tensor. Read more
Source§fn bool_zeros(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_zeros( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Creates a new bool tensor filled false. Read more
Source§fn bool_ones(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_ones( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Creates a new bool tensor filled true. Read more
Source§async fn bool_into_data(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn bool_into_data( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn bool_from_data(
data: TensorData,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_from_data( data: TensorData, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Creates a tensor from the data structure. Read more
Source§fn bool_into_int(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
out_dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bool_into_int( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, out_dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Converts bool tensor to int tensor. Read more
Source§fn bool_to_device(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_to_device( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Moves the tensor to the device.
Source§fn bool_reshape(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_reshape( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Reshapes the tensor. Read more
Source§fn bool_slice(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
slices: &[Slice],
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_slice( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, slices: &[Slice], ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Gets the values from the tensor for the given ranges. Read more
Source§fn bool_slice_assign(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
ranges: &[Slice],
value: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_slice_assign( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ranges: &[Slice], value: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Sets the values in the tensor for the given ranges. Read more
Source§fn bool_equal(
lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_equal( lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Equates the two tensors. Read more
Source§fn bool_not_equal(
lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_not_equal( lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn bool_not(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_not( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Inverses boolean values. Read more
Source§fn bool_and(
lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_and( lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Executes the logical and (
&&) operation on two boolean tensors. Read moreSource§fn bool_or(
lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_or( lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, rhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Executes the logical or (
||) operation on two boolean tensors. Read moreSource§fn bool_any(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_any( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Tests if any element in the boolean
tensor evaluates to True. Read moreSource§fn bool_any_dim(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_any_dim( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Source§fn bool_all(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_all( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the boolean
tensor evaluate to True. Read moreSource§fn bool_all_dim(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_all_dim( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Source§fn bool_into_float(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
out_dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn bool_into_float( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, out_dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Converts bool tensor to float tensor. Read more
Source§fn bool_swap_dims(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_swap_dims( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, dim1: usize, dim2: usize, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Swaps two dimensions of a bool tensor. Read more
Source§fn bool_repeat_dim(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
dim: usize,
times: usize,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_repeat_dim( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, dim: usize, times: usize, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Repeats one dimension of the tensor a given number of times along that dimension. Read more
Source§fn bool_permute(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_permute( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn bool_expand(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_expand( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Broadcasts the bool
tensor to the given shape.Source§fn bool_select(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
dim: usize,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_select( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, dim: usize, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Select tensor elements along the given dimension corresponding to the given indices. Read more
Source§fn bool_select_or(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
dim: usize,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
value: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_select_or( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, dim: usize, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, value: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_flip( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn bool_unfold(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn bool_unfold( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Unfold windows along a dimension. Read more
Source§fn bool_mask_where(
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
value: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_mask_where( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive, value: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
value: Scalar,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_mask_fill( tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive, value: Scalar, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_gather( dim: usize, tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Gather elements from the tensor at the given indices. Read more
Source§fn bool_scatter_or(
dim: usize,
tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
value: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_scatter_or( dim: usize, tensor: <CubeBackend as BackendTypes>::BoolTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, value: <CubeBackend as BackendTypes>::BoolTensorPrimitive, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn bool_equal_elem( lhs: <CubeBackend as BackendTypes>::BoolTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise equality comparison with a scalar. Read more
Source§fn bool_mask_select(
tensor: <B as BackendTypes>::BoolTensorPrimitive,
mask: <B as BackendTypes>::BoolTensorPrimitive,
) -> impl Future<Output = <B as BackendTypes>::BoolTensorPrimitive> + Send + 'static
fn bool_mask_select( tensor: <B as BackendTypes>::BoolTensorPrimitive, mask: <B as BackendTypes>::BoolTensorPrimitive, ) -> impl Future<Output = <B as BackendTypes>::BoolTensorPrimitive> + Send + 'static
Selects the elements of the tensor where the mask is true, returned as a 1D tensor. 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_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_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 Clone for CubeBackend
impl Clone for CubeBackend
Source§fn clone(&self) -> CubeBackend
fn clone(&self) -> CubeBackend
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 Debug for CubeBackend
impl Debug for CubeBackend
Source§impl Default for CubeBackend
impl Default for CubeBackend
Source§fn default() -> CubeBackend
fn default() -> CubeBackend
Returns the “default value” for a type. Read more
Source§impl DistributedOps<CubeBackend> for CubeBackend
impl DistributedOps<CubeBackend> for CubeBackend
Source§fn all_reduce(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
op: ReduceOperation,
device_ids: Vec<DeviceId>,
) -> CollectiveTensor<CubeBackend>
fn all_reduce( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, op: ReduceOperation, device_ids: Vec<DeviceId>, ) -> CollectiveTensor<CubeBackend>
all_reduce operation. Read more
Source§fn sync_collective(device: &<CubeBackend as BackendTypes>::Device)
fn sync_collective(device: &<CubeBackend as BackendTypes>::Device)
Sync the collective operations. Read more
Source§fn start_communication_server(
devices: &[<B as BackendTypes>::Device],
config: DistributedConfig,
)
fn start_communication_server( devices: &[<B as BackendTypes>::Device], config: DistributedConfig, )
Start the communication server used to orchestrate tensor syncing between devices. Read more
Source§fn close_communication_server(_device: &<B as BackendTypes>::Device)
fn close_communication_server(_device: &<B as BackendTypes>::Device)
Close the communication server used to orchestrate syncing between devices. Read more
Source§fn register_sync_parameters(
_device: &<B as BackendTypes>::Device,
distributed_params: Vec<DistributedParams>,
)
fn register_sync_parameters( _device: &<B as BackendTypes>::Device, distributed_params: Vec<DistributedParams>, )
Register the parameters that will require gradient synchronization for the upcoming backward pass. Read more
Source§fn submit_sync_collective(device: &<B as BackendTypes>::Device)
fn submit_sync_collective(device: &<B as BackendTypes>::Device)
Tell the gradient sync server that this device has submitted all its sync operations and is ready to be synchronized. Read more
Source§fn submit_gradient_sync(
tensor: TensorRef<B>,
distributed_params: DistributedParams,
)
fn submit_gradient_sync( tensor: TensorRef<B>, distributed_params: DistributedParams, )
Submit a gradient tensor for synchronization across all devices. Read more
Source§unsafe fn comm_device(tensor: &TensorRef<B>) -> <B as BackendTypes>::Device
unsafe fn comm_device(tensor: &TensorRef<B>) -> <B as BackendTypes>::Device
Get the device of the tensor reference. Read more
Source§unsafe fn float_from_ref(
tensor: &TensorRef<B>,
) -> <B as BackendTypes>::FloatTensorPrimitive
unsafe fn float_from_ref( tensor: &TensorRef<B>, ) -> <B as BackendTypes>::FloatTensorPrimitive
Returns a clone of the float tensor from the tensor reference. Read more
Source§impl FloatTensorOps<CubeBackend> for CubeBackend
impl FloatTensorOps<CubeBackend> for CubeBackend
Source§fn float_from_data(
data: TensorData,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_from_data( data: TensorData, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Creates a new tensor from the data structure. Read more
Source§fn float_random(
shape: Shape,
distribution: Distribution,
device: &<CubeBackend as BackendTypes>::Device,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_random( shape: Shape, distribution: Distribution, device: &<CubeBackend as BackendTypes>::Device, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Creates a new tensor with random values. Read more
Source§async fn float_into_data(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn float_into_data( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn float_to_device(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_to_device( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Moves the tensor to the given device. Read more
Source§fn float_empty(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_empty( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Creates an empty tensor with the given shape. Read more
Source§fn float_add(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_add( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Adds two tensors together. Read more
Source§fn float_add_scalar(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_add_scalar( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Adds a scalar to a tensor. Read more
Source§fn float_zeros(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_zeros( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Creates a new tensor with zeros. Read more
Source§fn float_full(
shape: Shape,
fill_value: Scalar,
device: &Device,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_full( shape: Shape, fill_value: Scalar, device: &Device, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Creates a tensor filled with given value. Read more
Source§fn float_ones(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_ones( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Creates a new tensor with ones. Read more
Source§fn float_sub(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sub( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Subtracts two tensors. Read more
Source§fn float_sub_scalar(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sub_scalar( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Subtracts a scalar from a tensor. Read more
Source§fn float_mul(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_mul( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Multiplies two tensors together element-wise.
Source§fn float_mul_scalar(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_mul_scalar( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Multiplies a tensor by a scalar. Read more
Source§fn float_div(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_div( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Divides two tensors element-wise. Read more
Source§fn float_div_scalar(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_div_scalar( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Divides a tensor by a scalar. Read more
Source§fn float_remainder(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_remainder( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the remainder of division between two tensors element-wise. Read more
Source§fn float_remainder_scalar(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_remainder_scalar( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the modulus of a tensor given a scalar. Read more
Source§fn float_matmul(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_matmul( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Multiplies two tensors together using matrix multiplication. Read more
Source§fn float_cross(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cross( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the cross product of two tensors along a given dimension. Read more
Source§fn float_swap_dims(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_swap_dims( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim1: usize, dim2: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Swaps two dimensions of a tensor. Read more
Source§fn float_reshape(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_reshape( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Reshapes a tensor. Read more
Source§fn float_gather(
dim: usize,
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_gather( dim: usize, tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gather elements from a tensor. Read more
Source§fn float_scatter(
dim: usize,
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
value: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
update: IndexingUpdateOp,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_scatter( dim: usize, tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, value: <CubeBackend as BackendTypes>::FloatTensorPrimitive, update: IndexingUpdateOp, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Scatter elements into a tensor using the specified update operation.
Source§fn float_scatter_nd(
data: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
values: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
reduction: IndexingUpdateOp,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_scatter_nd( data: <CubeBackend as BackendTypes>::FloatTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, values: <CubeBackend as BackendTypes>::FloatTensorPrimitive, reduction: IndexingUpdateOp, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Source§fn float_gather_nd(
data: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_gather_nd( data: <CubeBackend as BackendTypes>::FloatTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Source§fn float_select(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_select( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
Source§fn float_select_assign(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
value: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
update: IndexingUpdateOp,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_select_assign( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, value: <CubeBackend as BackendTypes>::FloatTensorPrimitive, update: IndexingUpdateOp, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Assign selected elements along a dimension using the specified update operation.
Source§fn float_slice(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
slices: &[Slice],
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_slice( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, slices: &[Slice], ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Select tensor elements corresponding to the given slices. Read more
Source§fn float_slice_assign(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
ranges: &[Slice],
value: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_slice_assign( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ranges: &[Slice], value: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Assign the selected elements corresponding to the given slices to the given value. Read more
Source§fn float_mask_where(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
value: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_mask_where( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive, value: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Update the given tensor with the value tensor where the mask is true. Read more
Source§fn float_mask_fill(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
value: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_mask_fill( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive, value: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Update the given tensor with the value where the mask is true. Read more
Source§fn float_equal(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_equal( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Equal comparison of two tensors. Read more
Source§fn float_not_equal(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_not_equal( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn float_equal_elem(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_equal_elem( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Equal comparison of a tensor and a scalar. Read more
Source§fn float_not_equal_elem(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_not_equal_elem( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn float_greater(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_greater( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Greater than comparison of two tensors. Read more
Source§fn float_greater_elem(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_greater_elem( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Greater than comparison of a tensor and a scalar. Read more
Source§fn float_greater_equal(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_greater_equal( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Greater than or equal comparison of two tensors. Read more
Source§fn float_greater_equal_elem(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_greater_equal_elem( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Greater than or equal comparison of a tensor and a scalar. Read more
Source§fn float_lower(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_lower( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Less than comparison of two tensors. Read more
Source§fn float_lower_elem(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_lower_elem( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Less than comparison of a tensor and a scalar. Read more
Source§fn float_lower_equal(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_lower_equal( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Less than or equal comparison of two tensors. Read more
Source§fn float_lower_equal_elem(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_lower_equal_elem( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Less than or equal comparison of a tensor and a scalar. Read more
Source§fn float_sum(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sum( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Sum of all elements in a tensor. Read more
Source§fn float_max(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_max( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn float_max_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_max_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
Source§fn float_min(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_min( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the minimum element of a tensor. Read more
Source§fn float_min_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_min_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the minimum elements of a tensor along an axis. Read more
Source§fn float_max_abs(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_max_abs( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the maximum absolute element of a tensor. Read more
Source§fn float_max_abs_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_max_abs_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the maximum absolute elements of a tensor along an axis. Read more
Source§fn float_any(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_any( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Tests if any element in the float
tensor evaluates to True. Read moreSource§fn float_any_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_any_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Source§fn float_all(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_all( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the float
tensor evaluate to True. Read moreSource§fn float_all_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_all_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Source§fn float_sum_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sum_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Sum of all elements in a tensor along a dimension. Read more
Source§fn float_sum_dims(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dims: &[usize],
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sum_dims( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dims: &[usize], ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Sum the tensor along several dimensions at once, keeping each of them
with length one. Read more
Source§fn float_mean_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_mean_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Mean of all elements in a tensor along a dimension. Read more
Source§fn float_mean(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_mean( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Mean of all elements in a tensor. Read more
Source§fn float_cumsum(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cumsum( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the cumulative sum of elements along a dimension. Read more
Source§fn float_cumprod(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cumprod( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the cumulative product of elements along a dimension. Read more
Source§fn float_cummin(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cummin( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn float_cummax(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cummax( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn float_prod(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_prod( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Product of all elements in a tensor. Read more
Source§fn float_prod_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_prod_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Product of all elements in a tensor along a dimension. Read more
Source§fn float_exp(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_exp( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with exponential values. Read more
Source§fn float_log(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_log( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with natural logarithm values. Read more
Source§fn float_log1p(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_log1p( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with logarithm values of (1 + Xi). Read more
Source§fn float_powf_scalar_impl(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_powf_scalar_impl( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float
value. Read moreSource§fn float_sqrt(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sqrt( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with square root values. Read more
Source§fn float_abs(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_abs( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with absolute values. Read more
Source§fn float_sign(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sign( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns the signs of the float
tensor. Read moreSource§fn float_cos(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cos( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with cosine values. Read more
Source§fn float_sin(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sin( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with sine values. Read more
Source§fn float_tan(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_tan( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with tangent values. Read more
Source§fn float_cosh(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cosh( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with hyperbolic cosine values. Read more
Source§fn float_sinh(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_sinh( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with hyperbolic sine values. Read more
Source§fn float_tanh(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_tanh( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with hyperbolic tangent values. Read more
Source§fn float_acos(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_acos( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse cosine values. Read more
Source§fn float_acosh(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_acosh( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse hyperbolic cosine values. Read more
Source§fn float_asin(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_asin( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse sine values. Read more
Source§fn float_asinh(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_asinh( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with inverse hyperbolic sine values. Read more
Source§fn float_atan(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_atan( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the inverse tangent values. Read more
Source§fn float_atanh(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_atanh( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the inverse hyperbolic tangent values. Read more
Source§fn float_atan2(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_atan2( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Source§fn float_round(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_round( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with rounded values. Read more
Source§fn float_floor(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_floor( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with floored values. Read more
Source§fn float_ceil(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_ceil( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with ceiled values. Read more
Source§fn float_trunc(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_trunc( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with truncated values. Read more
Source§fn float_erf(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_erf( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the error function values. Read more
Source§fn float_argmax(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn float_argmax( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
Source§fn float_argtopk(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
k: usize,
out_dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn float_argtopk( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, k: usize, out_dtype: IntDType, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
k: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_topk( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, k: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Gets the values of the k maximum elements of a tensor along an axis. Read more
Source§fn float_topk_with_indices(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
k: usize,
out_dtype: IntDType,
) -> (<CubeBackend as BackendTypes>::FloatTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
fn float_topk_with_indices( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, k: usize, out_dtype: IntDType, ) -> (<CubeBackend as BackendTypes>::FloatTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
Gets the values of the k maximum elements of a tensor along an axis, and their indices. Read more
Source§fn float_max_dim_with_indices(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices_dtype: IntDType,
) -> (<CubeBackend as BackendTypes>::FloatTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
fn float_max_dim_with_indices( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, indices_dtype: IntDType, ) -> (<CubeBackend as BackendTypes>::FloatTensorPrimitive, <CubeBackend 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: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
indices_dtype: IntDType,
) -> (<CubeBackend as BackendTypes>::FloatTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
fn float_min_dim_with_indices( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, indices_dtype: IntDType, ) -> (<CubeBackend as BackendTypes>::FloatTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
Source§fn float_argmin(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
out_dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn float_argmin( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, out_dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
Source§fn float_into_int(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn float_into_int( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Converts float tensor to int tensor. Read more
Source§fn float_clamp(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
min: Scalar,
max: Scalar,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_clamp( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, min: Scalar, max: Scalar, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
Source§fn float_recip(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_recip( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Calculates the reciprocals element-wise
Source§fn float_repeat_dim(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
times: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_repeat_dim( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, times: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Repeat the tensor along the given dimension. Read more
Source§fn float_powf(
lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_powf( lhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, rhs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Element-wise power with a FloatTensor. Read more
Source§fn float_permute(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_permute( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn float_expand(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_expand( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Broadcasts the float
tensor to the given shape.Source§fn float_flip(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_flip( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn float_cast(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_cast( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Converts a tensor to another floating point data type. Read more
Source§fn float_unfold(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_unfold( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Unfold windows along a dimension. Read more
Source§fn float_is_nan(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_is_nan( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn float_is_inf( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
grid: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: GridSampleOptions,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn float_grid_sample_2d( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, grid: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: GridSampleOptions, ) -> <CubeBackend 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_mask_select(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
mask: <B as BackendTypes>::BoolTensorPrimitive,
) -> impl Future<Output = <B as BackendTypes>::FloatTensorPrimitive> + Send + 'static
fn float_mask_select( tensor: <B as BackendTypes>::FloatTensorPrimitive, mask: <B as BackendTypes>::BoolTensorPrimitive, ) -> impl Future<Output = <B as BackendTypes>::FloatTensorPrimitive> + Send + 'static
Selects the elements of the tensor where the mask is true, returned as a 1D tensor. 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_powi(
lhs: <B as BackendTypes>::FloatTensorPrimitive,
rhs: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_powi( lhs: <B as BackendTypes>::FloatTensorPrimitive, rhs: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Element-wise power with an IntTensor. Read more
Source§fn float_powi_scalar(
lhs: <B as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_powi_scalar( lhs: <B as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar. Read more
Source§fn float_powi_scalar_impl(
lhs: <B as BackendTypes>::FloatTensorPrimitive,
rhs: Scalar,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_powi_scalar_impl( lhs: <B as BackendTypes>::FloatTensorPrimitive, rhs: Scalar, ) -> <B as BackendTypes>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar. Read more
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_hypot(
lhs: <B as BackendTypes>::FloatTensorPrimitive,
rhs: <B as BackendTypes>::FloatTensorPrimitive,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_hypot( lhs: <B as BackendTypes>::FloatTensorPrimitive, rhs: <B as BackendTypes>::FloatTensorPrimitive, ) -> <B as BackendTypes>::FloatTensorPrimitive
Returns a new tensor with the Euclidean distance values. Read more
Source§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_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§fn float_pad(
tensor: <B as BackendTypes>::FloatTensorPrimitive,
padding: &[(usize, usize)],
mode: PadMode,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn float_pad( tensor: <B as BackendTypes>::FloatTensorPrimitive, padding: &[(usize, usize)], mode: PadMode, ) -> <B as BackendTypes>::FloatTensorPrimitive
Pads a tensor with one
(before, after) pair per dimension.Source§impl FusionBackend for CubeBackend
impl FusionBackend for CubeBackend
Source§type FusionRuntime = FusionCubeRuntime
type FusionRuntime = FusionCubeRuntime
The runtime used for this backend.
Source§type FullPrecisionBackend = CubeBackend
type FullPrecisionBackend = CubeBackend
Pointer to the full precision fusion backend.
Source§fn cast_float(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dtype: DType,
) -> <CubeBackend as BackendIr>::Handle
fn cast_float( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dtype: DType, ) -> <CubeBackend as BackendIr>::Handle
Cast a float tensor and returns the resulting handle.
Source§fn memory_persistent(
device: &<CubeBackend as BackendTypes>::Device,
enabled: bool,
)
fn memory_persistent( device: &<CubeBackend as BackendTypes>::Device, enabled: bool, )
Set the standing persistent-allocation mode of the device stream that
executes fused operations. Read more
Source§impl IntTensorOps<CubeBackend> for CubeBackend
impl IntTensorOps<CubeBackend> for CubeBackend
Source§fn int_empty(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_empty( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Creates a new int tensor. Read more
Source§async fn int_into_data(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn int_into_data( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn int_from_data(
data: TensorData,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_from_data( data: TensorData, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Creates a tensor from the data structure. Read more
Source§fn int_to_device(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_to_device( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Moves the tensor to the given device.
Source§fn int_reshape(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_reshape( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Reshapes the tensor. Read more
Source§fn int_slice(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
slices: &[Slice],
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_slice( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, slices: &[Slice], ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the element at the given indices. Read more
Source§fn int_slice_assign(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
ranges: &[Slice],
value: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_slice_assign( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ranges: &[Slice], value: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Sets the values in the tensor for the given ranges. Read more
Source§fn int_matmul(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_matmul( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Multiplies two tensors together using matrix multiplication. Read more
Source§fn int_mask_where(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
value: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_mask_where( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive, value: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::IntTensorPrimitive,
mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive,
value: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_mask_fill( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, mask: <CubeBackend as BackendTypes>::BoolTensorPrimitive, value: Scalar, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::IntTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_gather( dim: usize, tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gather elements from the tensor at the given indices. Read more
Source§fn int_scatter(
dim: usize,
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
value: <CubeBackend as BackendTypes>::IntTensorPrimitive,
update: IndexingUpdateOp,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_scatter( dim: usize, tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, value: <CubeBackend as BackendTypes>::IntTensorPrimitive, update: IndexingUpdateOp, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Scatter elements into a tensor using the specified update operation.
Source§fn int_scatter_nd(
data: <CubeBackend as BackendTypes>::IntTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
values: <CubeBackend as BackendTypes>::IntTensorPrimitive,
reduction: IndexingUpdateOp,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_scatter_nd( data: <CubeBackend as BackendTypes>::IntTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, values: <CubeBackend as BackendTypes>::IntTensorPrimitive, reduction: IndexingUpdateOp, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Multi-dimensional scatter for int tensors.
Source§fn int_gather_nd(
data: <CubeBackend as BackendTypes>::IntTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_gather_nd( data: <CubeBackend as BackendTypes>::IntTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Multi-dimensional gather for int tensors.
Source§fn int_select(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_select( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Select tensor elements along the given dimension corresponding to the given indices. Read more
Source§fn int_select_assign(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
value: <CubeBackend as BackendTypes>::IntTensorPrimitive,
update: IndexingUpdateOp,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_select_assign( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, value: <CubeBackend as BackendTypes>::IntTensorPrimitive, update: IndexingUpdateOp, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Assign selected elements along a dimension using the specified update operation.
Source§fn int_equal(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_equal( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise equality comparison. Read more
Source§fn int_not_equal(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_not_equal( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn int_equal_elem(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_equal_elem( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise equality comparison with a scalar. Read more
Source§fn int_not_equal_elem(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_not_equal_elem( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn int_greater(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_greater( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise greater than comparison. Read more
Source§fn int_greater_elem(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_greater_elem( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise greater than comparison with a scalar. Read more
Source§fn int_greater_equal(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_greater_equal( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise greater than or equal comparison. Read more
Source§fn int_greater_equal_elem(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_greater_equal_elem( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise greater than or equal comparison with a scalar. Read more
Source§fn int_lower(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_lower( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise less than comparison. Read more
Source§fn int_lower_elem(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_lower_elem( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise less than comparison with a scalar. Read more
Source§fn int_lower_equal(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_lower_equal( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise less than or equal comparison. Read more
Source§fn int_lower_equal_elem(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_lower_equal_elem( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Element-wise less than or equal comparison with a scalar. Read more
Source§fn int_add(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_add( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise addition. Read more
Source§fn int_add_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_add_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise addition with a scalar. Read more
Source§fn int_sub(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_sub( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise subtraction. Read more
Source§fn int_sub_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_sub_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise subtraction with a scalar. Read more
Source§fn int_mul(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_mul( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise multiplication. Read more
Source§fn int_mul_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_mul_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise multiplication with a scalar. Read more
Source§fn int_div(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_div( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise division. Read more
Source§fn int_div_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_div_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise division with a scalar. Read more
Source§fn int_remainder(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_remainder( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise floor modulo. Read more
Source§fn int_remainder_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_remainder_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise floor modulo with a scalar. Read more
Source§fn int_zeros(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_zeros( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Creates a tensor of zeros. Read more
Source§fn int_ones(
shape: Shape,
device: &<CubeBackend as BackendTypes>::Device,
dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_ones( shape: Shape, device: &<CubeBackend as BackendTypes>::Device, dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Creates a tensor of ones. Read more
Source§fn int_full(
shape: Shape,
fill_value: Scalar,
device: &<CubeBackend as BackendTypes>::Device,
dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_full( shape: Shape, fill_value: Scalar, device: &<CubeBackend as BackendTypes>::Device, dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Creates a tensor filled with given value. Read more
Source§fn int_sum(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_sum( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Sums all elements in the tensor. Read more
Source§fn int_sum_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_sum_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Sums all elements in the tensor along a dimension. Read more
Source§fn int_any(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_any( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Tests if any element in the int
tensor evaluates to True. Read moreSource§fn int_any_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_any_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Source§fn int_all(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_all( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Tests if all elements in the int
tensor evaluate to True. Read moreSource§fn int_all_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
out_dtype: BoolStore,
) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
fn int_all_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, out_dtype: BoolStore, ) -> <CubeBackend as BackendTypes>::BoolTensorPrimitive
Source§fn int_prod(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_prod( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the product of all elements in the tensor. Read more
Source§fn int_prod_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_prod_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the product of all elements in the tensor along a dimension. Read more
Source§fn int_max(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_max( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the maximum element in the tensor. Read more
Source§fn int_max_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_max_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the maximum element in the tensor along a dimension. Read more
Source§fn int_topk(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
k: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_topk( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, k: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the values of the k maximum elements along a dimension. Read more
Source§fn int_topk_with_indices(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
k: usize,
) -> (<CubeBackend as BackendTypes>::IntTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
fn int_topk_with_indices( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, k: usize, ) -> (<CubeBackend as BackendTypes>::IntTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
Gets the values of the k maximum elements along a dimension, and their indices. Read more
Source§fn int_max_dim_with_indices(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> (<CubeBackend as BackendTypes>::IntTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
fn int_max_dim_with_indices( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> (<CubeBackend as BackendTypes>::IntTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
Gets the maximum elements and corresponding indices along a dimension. Read more
Source§fn int_min_dim_with_indices(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> (<CubeBackend as BackendTypes>::IntTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
fn int_min_dim_with_indices( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> (<CubeBackend as BackendTypes>::IntTensorPrimitive, <CubeBackend as BackendTypes>::IntTensorPrimitive)
Gets the minimum elements and corresponding indices along a dimension. Read more
Source§fn int_max_abs(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_max_abs( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the maximum absolute element in the tensor. Read more
Source§fn int_max_abs_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_max_abs_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the maximum absolute element in the tensor along a dimension. Read more
Source§fn int_min(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_min( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the minimum element in the tensor. Read more
Source§fn int_min_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_min_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the minimum elements in the tensor along a dimension. Read more
Source§fn int_mean_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_mean_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the mean of all elements in the tensor along a dimension. Read more
Source§fn int_cumsum(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_cumsum( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the cumulative sum of elements along a dimension. Read more
Source§fn int_cumprod(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_cumprod( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the cumulative product of elements along a dimension. Read more
Source§fn int_cummin(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_cummin( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn int_cummax(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_cummax( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn int_argmax(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_argmax( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the indices of the maximum elements along a dimension. Read more
Source§fn int_argtopk(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
k: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_argtopk( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, k: usize, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_argmin( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Gets the indices of the minimum elements along a dimension. Read more
Source§fn int_clamp(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
min: Scalar,
max: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_clamp( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, min: Scalar, max: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
Source§fn int_abs(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_abs( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Returns a new tensor with absolute values. Read more
Source§fn int_sign(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_sign( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Returns the signs of the int
tensor. Read moreSource§fn int_into_float(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
out_dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn int_into_float( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, out_dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Converts int tensor to float tensor. Read more
Source§fn int_swap_dims(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_swap_dims( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim1: usize, dim2: usize, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Swaps two dimensions of an int tensor. Read more
Source§fn int_repeat_dim(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dim: usize,
times: usize,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_repeat_dim( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dim: usize, times: usize, ) -> <CubeBackend 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: &<CubeBackend as BackendTypes>::Device,
dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_random( shape: Shape, distribution: Distribution, device: &<CubeBackend as BackendTypes>::Device, dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Creates a new int tensor with random values. Read more
Source§fn int_permute(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_permute( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn int_expand(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_expand( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Broadcasts the int
tensor to the given shape.Source§fn int_flip(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_flip( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn bitwise_and(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_and( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise AND operation for Int Tensors
Source§fn bitwise_and_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_and_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise AND operation for Int Tensors with a scalar
Source§fn bitwise_or(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_or( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise OR operation for Int Tensors
Source§fn bitwise_or_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_or_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise OR operation for Int Tensors with a scalar
Source§fn bitwise_xor(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_xor( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise XOR operation for Int Tensors
Source§fn bitwise_xor_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_xor_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise XOR operation for Int Tensors with a scalar
Source§fn bitwise_not(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_not( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise NOT operation for Int Tensors
Source§fn bitwise_left_shift(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_left_shift( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise left shift operation for Int Tensors
Source§fn bitwise_left_shift_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_left_shift_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise left shift operation for Int Tensors with a scalar
Source§fn bitwise_right_shift(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_right_shift( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise right shift operation for Int Tensors
Source§fn bitwise_right_shift_scalar(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn bitwise_right_shift_scalar( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Bitwise right shift operation for Int Tensors with a scalar
Source§fn int_cast(
tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive,
dtype: IntDType,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_cast( tensor: <CubeBackend as BackendTypes>::IntTensorPrimitive, dtype: IntDType, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Converts a tensor to another integer data type. Read more
Source§fn int_unfold(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn int_unfold( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Unfold windows along a dimension. Read more
Source§fn int_powi(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_powi( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise power with a IntTensor. Read more
Source§fn int_powi_scalar_impl(
lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive,
rhs: Scalar,
) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
fn int_powi_scalar_impl( lhs: <CubeBackend as BackendTypes>::IntTensorPrimitive, rhs: Scalar, ) -> <CubeBackend as BackendTypes>::IntTensorPrimitive
Element-wise power with a scalar. Read more
Source§fn int_mask_select(
tensor: <B as BackendTypes>::IntTensorPrimitive,
mask: <B as BackendTypes>::BoolTensorPrimitive,
) -> impl Future<Output = <B as BackendTypes>::IntTensorPrimitive> + Send + 'static
fn int_mask_select( tensor: <B as BackendTypes>::IntTensorPrimitive, mask: <B as BackendTypes>::BoolTensorPrimitive, ) -> impl Future<Output = <B as BackendTypes>::IntTensorPrimitive> + Send + 'static
Selects the elements of the tensor where the mask is true, returned as a 1D tensor. 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_square(
tensor: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_square( tensor: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::IntTensorPrimitive
Element-wise square 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_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_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_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§fn int_pad(
tensor: <B as BackendTypes>::IntTensorPrimitive,
padding: &[(usize, usize)],
mode: PadMode,
) -> <B as BackendTypes>::IntTensorPrimitive
fn int_pad( tensor: <B as BackendTypes>::IntTensorPrimitive, padding: &[(usize, usize)], mode: PadMode, ) -> <B as BackendTypes>::IntTensorPrimitive
Pads a tensor with one
(before, after) pair per dimension.Source§impl ModuleOps<CubeBackend> for CubeBackend
impl ModuleOps<CubeBackend> for CubeBackend
Source§fn conv1d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: ConvOptions<1>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv1d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: ConvOptions<1>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
One dimensional convolution. Read more
Source§fn conv1d_x_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv1d_x_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
x.Source§fn conv1d_weight_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv1d_weight_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
weight.Source§fn conv2d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: ConvOptions<2>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv2d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: ConvOptions<2>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Two dimensional convolution. Read more
Source§fn conv2d_x_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv2d_x_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
x.Source§fn conv2d_weight_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv2d_weight_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
weight.Source§fn deform_conv2d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
offset: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
mask: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: DeformConvOptions<2>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn deform_conv2d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, offset: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, mask: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: DeformConvOptions<2>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Two dimensional deformable convolution. Read more
Source§fn deform_conv2d_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
offset: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
mask: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: DeformConvOptions<2>,
) -> DeformConv2dBackward<CubeBackend>
fn deform_conv2d_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, offset: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, mask: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: DeformConvOptions<2>, ) -> DeformConv2dBackward<CubeBackend>
Backward pass for the deform_conv2d operation.
Source§fn conv3d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: ConvOptions<3>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv3d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: ConvOptions<3>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Three dimensional convolution. Read more
Source§fn conv3d_x_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv3d_x_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
x.Source§fn conv3d_weight_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv3d_weight_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
weight.Source§fn conv_transpose2d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: ConvTransposeOptions<2>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv_transpose2d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: ConvTransposeOptions<2>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Two dimensional transposed convolution. Read more
Source§fn conv_transpose3d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: ConvTransposeOptions<3>,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn conv_transpose3d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, weight: <CubeBackend as BackendTypes>::FloatTensorPrimitive, bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: ConvTransposeOptions<3>, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Three dimensional transposed convolution. Read more
Source§fn avg_pool2d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
ceil_mode: bool,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn avg_pool2d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ceil_mode: bool, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Two dimensional avg pooling. Read more
Source§fn avg_pool2d_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
ceil_mode: bool,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn avg_pool2d_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ceil_mode: bool, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the avg pooling 2d operation.
Source§fn max_pool2d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
ceil_mode: bool,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn max_pool2d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ceil_mode: bool, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Two dimensional max pooling. Read more
Source§fn max_pool2d_with_indices(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
ceil_mode: bool,
indices_dtype: IntDType,
) -> MaxPool2dWithIndices<CubeBackend>
fn max_pool2d_with_indices( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ceil_mode: bool, indices_dtype: IntDType, ) -> MaxPool2dWithIndices<CubeBackend>
Two dimensional max pooling with indices. Read more
Source§fn max_pool2d_with_indices_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
ceil_mode: bool,
output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
indices: <CubeBackend as BackendTypes>::IntTensorPrimitive,
) -> MaxPool2dBackward<CubeBackend>
fn max_pool2d_with_indices_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ceil_mode: bool, output_grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, indices: <CubeBackend as BackendTypes>::IntTensorPrimitive, ) -> MaxPool2dBackward<CubeBackend>
Backward pass for the max pooling 2d operation.
Source§fn adaptive_avg_pool2d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool2d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Two dimensional adaptive avg pooling. Read more
Source§fn adaptive_avg_pool2d_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool2d_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 2d operation.
Source§fn adaptive_avg_pool3d(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 3],
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool3d( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 3], ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Three dimensional adaptive avg pooling. Read more
Source§fn adaptive_avg_pool3d_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn adaptive_avg_pool3d_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 3d operation.
Source§fn interpolate(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn interpolate( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], options: InterpolateOptions, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Down/up samples the input. Read more
Source§fn interpolate_backward(
x: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn interpolate_backward( x: <CubeBackend as BackendTypes>::FloatTensorPrimitive, grad: <CubeBackend as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], options: InterpolateOptions, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Backward pass for the interpolate operation.
Source§fn attention(
query: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
key: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
value: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
mask: Option<<CubeBackend as BackendTypes>::BoolTensorPrimitive>,
attn_bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>,
options: AttentionModuleOptions,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn attention( query: <CubeBackend as BackendTypes>::FloatTensorPrimitive, key: <CubeBackend as BackendTypes>::FloatTensorPrimitive, value: <CubeBackend as BackendTypes>::FloatTensorPrimitive, mask: Option<<CubeBackend as BackendTypes>::BoolTensorPrimitive>, attn_bias: Option<<CubeBackend as BackendTypes>::FloatTensorPrimitive>, options: AttentionModuleOptions, ) -> <CubeBackend 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: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
targets: <CubeBackend as BackendTypes>::IntTensorPrimitive,
input_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive,
target_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive,
blank: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn ctc_loss( log_probs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, targets: <CubeBackend as BackendTypes>::IntTensorPrimitive, input_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive, target_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive, blank: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Computes the Connectionist Temporal Classification (CTC) loss. Read more
Source§fn ctc_loss_backward(
log_probs: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
targets: <CubeBackend as BackendTypes>::IntTensorPrimitive,
input_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive,
target_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive,
grad_loss: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
blank: usize,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn ctc_loss_backward( log_probs: <CubeBackend as BackendTypes>::FloatTensorPrimitive, targets: <CubeBackend as BackendTypes>::IntTensorPrimitive, input_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive, target_lengths: <CubeBackend as BackendTypes>::IntTensorPrimitive, grad_loss: <CubeBackend as BackendTypes>::FloatTensorPrimitive, blank: usize, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Source§fn batch_norm(
x: <B as BackendTypes>::FloatTensorPrimitive,
gamma: <B as BackendTypes>::FloatTensorPrimitive,
beta: <B as BackendTypes>::FloatTensorPrimitive,
mean: <B as BackendTypes>::FloatTensorPrimitive,
variance: <B as BackendTypes>::FloatTensorPrimitive,
epsilon: f64,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn batch_norm( x: <B as BackendTypes>::FloatTensorPrimitive, gamma: <B as BackendTypes>::FloatTensorPrimitive, beta: <B as BackendTypes>::FloatTensorPrimitive, mean: <B as BackendTypes>::FloatTensorPrimitive, variance: <B as BackendTypes>::FloatTensorPrimitive, epsilon: f64, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies batch normalization using explicitly supplied channel statistics. Read more
Source§fn batch_norm_train(
x: <B as BackendTypes>::FloatTensorPrimitive,
gamma: <B as BackendTypes>::FloatTensorPrimitive,
beta: <B as BackendTypes>::FloatTensorPrimitive,
epsilon: f64,
) -> BatchNormTrain<B>
fn batch_norm_train( x: <B as BackendTypes>::FloatTensorPrimitive, gamma: <B as BackendTypes>::FloatTensorPrimitive, beta: <B as BackendTypes>::FloatTensorPrimitive, epsilon: f64, ) -> BatchNormTrain<B>
Applies batch normalization with the statistics of the batch itself,
and returns them. Read more
Source§fn batch_norm_train_backward(
x: <B as BackendTypes>::FloatTensorPrimitive,
gamma: <B as BackendTypes>::FloatTensorPrimitive,
mean: <B as BackendTypes>::FloatTensorPrimitive,
variance: <B as BackendTypes>::FloatTensorPrimitive,
epsilon: f64,
output_grad: <B as BackendTypes>::FloatTensorPrimitive,
) -> BatchNormTrainBackward<B>
fn batch_norm_train_backward( x: <B as BackendTypes>::FloatTensorPrimitive, gamma: <B as BackendTypes>::FloatTensorPrimitive, mean: <B as BackendTypes>::FloatTensorPrimitive, variance: <B as BackendTypes>::FloatTensorPrimitive, epsilon: f64, output_grad: <B as BackendTypes>::FloatTensorPrimitive, ) -> BatchNormTrainBackward<B>
Gradients of batch_norm_train with
respect to its input,
gamma and beta, given the gradient of its
output. mean and variance are the statistics it returned.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 fold4d(
x: <B as BackendTypes>::FloatTensorPrimitive,
output_size: [usize; 2],
kernel_size: [usize; 2],
options: UnfoldOptions,
) -> <B as BackendTypes>::FloatTensorPrimitive
fn fold4d( x: <B as BackendTypes>::FloatTensorPrimitive, output_size: [usize; 2], kernel_size: [usize; 2], options: UnfoldOptions, ) -> <B as BackendTypes>::FloatTensorPrimitive
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,
indices_dtype: IntDType,
) -> MaxPool1dWithIndices<B>
fn max_pool1d_with_indices( x: <B as BackendTypes>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, indices_dtype: IntDType, ) -> 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 layer_norm(
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( tensor: <B as BackendTypes>::FloatTensorPrimitive, gamma: <B as BackendTypes>::FloatTensorPrimitive, beta: Option<<B as BackendTypes>::FloatTensorPrimitive>, epsilon: f64, ) -> <B as BackendTypes>::FloatTensorPrimitive
Applies Layer Normalization over the last dimension of the input tensor. Read more
Source§impl QTensorOps<CubeBackend> for CubeBackend
impl QTensorOps<CubeBackend> for CubeBackend
Source§fn q_from_data(
data: TensorData,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn q_from_data( data: TensorData, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Creates a new tensor from the data structure. Read more
Source§fn quantize(
tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive,
scheme: &QuantScheme,
qparams: QuantizationParametersPrimitive<CubeBackend>,
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn quantize( tensor: <CubeBackend as BackendTypes>::FloatTensorPrimitive, scheme: &QuantScheme, qparams: QuantizationParametersPrimitive<CubeBackend>, ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Convert the tensor to a lower precision data type based on the quantization scheme and parameters.
Source§fn dequantize(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
dtype: FloatDType,
) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
fn dequantize( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, dtype: FloatDType, ) -> <CubeBackend as BackendTypes>::FloatTensorPrimitive
Convert the tensor back to a higher precision data type.
Source§fn q_to_device(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
device: &<CubeBackend as BackendTypes>::Device,
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn q_to_device( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, device: &<CubeBackend as BackendTypes>::Device, ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Moves the tensor to the given device. Read more
Source§fn q_reshape(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
shape: Shape,
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn q_reshape( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, shape: Shape, ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Reshapes a tensor. Read more
Source§async fn q_into_data(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
) -> Result<TensorData, ExecutionError>
async fn q_into_data( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, ) -> Result<TensorData, ExecutionError>
Converts the tensor to a data structure. Read more
Source§fn q_swap_dims(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn q_swap_dims( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, dim1: usize, dim2: usize, ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Swaps two dimensions of a tensor. Read more
Source§fn q_permute(
tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
axes: &[usize],
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn q_permute( tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, axes: &[usize], ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Permutes the dimensions of a tensor. Read more
Source§fn q_flip(
_tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive,
_axes: &[usize],
) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
fn q_flip( _tensor: <CubeBackend as BackendTypes>::QuantizedTensorPrimitive, _axes: &[usize], ) -> <CubeBackend as BackendTypes>::QuantizedTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn q_matmul(
lhs: TensorPrimitive<CubeBackend>,
rhs: TensorPrimitive<CubeBackend>,
) -> TensorPrimitive<CubeBackend>
fn q_matmul( lhs: TensorPrimitive<CubeBackend>, rhs: TensorPrimitive<CubeBackend>, ) -> TensorPrimitive<CubeBackend>
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 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_expand(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
shape: Shape,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_expand( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, shape: Shape, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Broadcasts the
tensor to the given shape.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_select(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
indices: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_select( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, indices: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
Source§fn q_slice(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
slices: &[Slice],
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_slice( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, slices: &[Slice], ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Select tensor elements corresponding to the given slices. Read more
Source§fn q_gather(
dim: usize,
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
indices: <B as BackendTypes>::IntTensorPrimitive,
) -> <B as BackendTypes>::QuantizedTensorPrimitive
fn q_gather( dim: usize, tensor: <B as BackendTypes>::QuantizedTensorPrimitive, indices: <B as BackendTypes>::IntTensorPrimitive, ) -> <B as BackendTypes>::QuantizedTensorPrimitive
Gather elements from 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_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_topk_with_indices(
tensor: <B as BackendTypes>::QuantizedTensorPrimitive,
dim: usize,
k: usize,
out_dtype: IntDType,
) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
fn q_topk_with_indices( tensor: <B as BackendTypes>::QuantizedTensorPrimitive, dim: usize, k: usize, out_dtype: IntDType, ) -> (<B as BackendTypes>::QuantizedTensorPrimitive, <B as BackendTypes>::IntTensorPrimitive)
Gets the values of the k maximum elements of a tensor along an axis, and their indices. 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 TransactionOps<CubeBackend> for CubeBackend
impl TransactionOps<CubeBackend> for CubeBackend
Source§async fn tr_execute(
transaction: TransactionPrimitive<CubeBackend>,
) -> Result<TransactionPrimitiveData, ExecutionError>
async fn tr_execute( transaction: TransactionPrimitive<CubeBackend>, ) -> Result<TransactionPrimitiveData, ExecutionError>
Executes a transaction and return its
data.
Auto Trait Implementations§
impl Freeze for CubeBackend
impl RefUnwindSafe for CubeBackend
impl Send for CubeBackend
impl Sync for CubeBackend
impl Unpin for CubeBackend
impl UnsafeUnpin for CubeBackend
impl UnwindSafe for CubeBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more