pub enum TensorOp {
Show 110 variants
Add,
Sub,
Mul,
Div,
Neg,
MatMul,
Linear,
Conv2D,
Embedding,
ReLU,
GeLU,
SiLU,
Sigmoid,
Softmax,
Tanh,
LeakyReLU,
ELU,
Mish,
HardSwish,
HardSigmoid,
LayerNorm,
RMSNorm,
BatchNorm,
GroupNorm,
InstanceNorm,
Reshape,
Transpose,
Concat,
Split,
Gather,
Scatter,
Squeeze,
Unsqueeze,
Permute,
Expand,
Slice,
Pad,
Tile,
Constant,
Zeros,
Ones,
Arange,
Full,
Attention,
MultiHeadAttention,
MultiQueryAttention,
GroupedQueryAttention,
FlashAttention,
SlidingWindowAttention,
CrossAttention,
PagedAttention,
MoEDispatch,
MoECombine,
Conv1D,
Conv3D,
ConvTranspose2D,
DepthwiseConv2D,
DilatedConv2D,
MaxPool2D,
AvgPool2D,
AdaptiveAvgPool2D,
GlobalAvgPool,
LSTMCell,
GRUCell,
RNNCell,
Einsum,
FFT,
IFFT,
SVD,
Eig,
Solve,
TopK,
Sort,
Cumsum,
Where,
Clamp,
SparseMatMul,
SparseEmbedding,
Quantize,
Dequantize,
QuantizeInt4,
DequantizeInt4,
QuantizeFp8,
DequantizeFp8,
UNetDownBlock,
UNetUpBlock,
TimestepEmbedding,
GNNMessagePassing,
GNNGlobalPooling,
Checkpoint,
Offload,
GradAccumulate,
GradMatMul,
GradReLU,
GradSoftmax,
GradLayerNorm,
GradAttention,
GradConv2D,
GradLinear,
GradGeLU,
ParallelSplit,
ParallelAllReduce,
PipelineSend,
PipelineReceive,
FusedMatMulBiasReLU,
FusedMatMulBias,
FusedLinearGeLU,
FusedAttentionLayerNorm,
FusedLinearSiLU,
FusedConvBatchNormReLU,
}Variants§
Add
Sub
Mul
Div
Neg
MatMul
Linear
Conv2D
Embedding
ReLU
GeLU
SiLU
Sigmoid
Softmax
Tanh
LeakyReLU
ELU
Mish
HardSwish
HardSigmoid
LayerNorm
RMSNorm
BatchNorm
GroupNorm
InstanceNorm
Reshape
Transpose
Concat
Split
Gather
Scatter
Squeeze
Unsqueeze
Permute
Expand
Slice
Pad
Tile
Constant
Zeros
Ones
Arange
Full
Attention
MultiHeadAttention
MultiQueryAttention
GroupedQueryAttention
FlashAttention
SlidingWindowAttention
CrossAttention
PagedAttention
MoEDispatch
MoECombine
Conv1D
Conv3D
ConvTranspose2D
DepthwiseConv2D
DilatedConv2D
MaxPool2D
AvgPool2D
AdaptiveAvgPool2D
GlobalAvgPool
LSTMCell
GRUCell
RNNCell
Einsum
FFT
IFFT
SVD
Eig
Solve
TopK
Sort
Cumsum
Where
Clamp
SparseMatMul
SparseEmbedding
Quantize
Dequantize
QuantizeInt4
DequantizeInt4
QuantizeFp8
DequantizeFp8
UNetDownBlock
UNetUpBlock
TimestepEmbedding
GNNMessagePassing
GNNGlobalPooling
Checkpoint
Offload
GradAccumulate
GradMatMul
GradReLU
GradSoftmax
GradLayerNorm
GradAttention
GradConv2D
GradLinear
GradGeLU
ParallelSplit
ParallelAllReduce
PipelineSend
PipelineReceive
FusedMatMulBiasReLU
FusedMatMulBias
FusedLinearGeLU
FusedAttentionLayerNorm
FusedLinearSiLU
FusedConvBatchNormReLU
Implementations§
Source§impl TensorOp
impl TensorOp
pub fn name(&self) -> &'static str
pub fn from_name(name: &str) -> Option<Self>
pub fn num_inputs(&self) -> (usize, usize)
Sourcepub fn flops_formula(&self) -> &'static str
pub fn flops_formula(&self) -> &'static str
Returns the asymptotic FLOPs formula as a human-readable string.
Sourcepub fn is_zero_flop(&self) -> bool
pub fn is_zero_flop(&self) -> bool
Returns true if this op performs no arithmetic (zero FLOPs).
Sourcepub fn is_activation(&self) -> bool
pub fn is_activation(&self) -> bool
Returns true if this is an element-wise (unary or binary) activation.
Sourcepub fn is_attention(&self) -> bool
pub fn is_attention(&self) -> bool
Returns true if this is an attention variant.
Sourcepub fn is_convolution(&self) -> bool
pub fn is_convolution(&self) -> bool
Returns true if this is a convolution variant.
Sourcepub fn is_normalisation(&self) -> bool
pub fn is_normalisation(&self) -> bool
Returns true if this is a normalisation op.
Sourcepub fn is_gradient(&self) -> bool
pub fn is_gradient(&self) -> bool
Returns true if this is a gradient (backward) operation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TensorOp
impl<'de> Deserialize<'de> for TensorOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TensorOp
impl StructuralPartialEq for TensorOp
Auto Trait Implementations§
impl Freeze for TensorOp
impl RefUnwindSafe for TensorOp
impl Send for TensorOp
impl Sync for TensorOp
impl Unpin for TensorOp
impl UnsafeUnpin for TensorOp
impl UnwindSafe for TensorOp
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