#[non_exhaustive]pub enum CoreSemanticOp {
Show 51 variants
Add,
Sub,
Mul,
Neg,
Conj,
DotGeneral {
config: DotGeneralConfig,
},
Transpose {
perm: Vec<usize>,
},
Reshape {
to_shape: Vec<DimExpr>,
},
BroadcastInDim {
shape: Vec<DimExpr>,
dims: Vec<usize>,
},
Convert {
from: DType,
to: DType,
},
Constant {
dtype: DType,
bytes: Vec<u8>,
},
ReduceSum {
axes: Vec<usize>,
},
ReduceSumSquares {
axes: Vec<usize>,
},
Div,
Rem,
Abs,
Sign,
Maximum,
Minimum,
Compare(CompareDir),
Select,
Clamp,
Exp,
Log,
Sin,
Cos,
Tanh,
Sqrt,
Rsqrt,
Pow,
Expm1,
Log1p,
ExtractDiag {
axis_a: usize,
axis_b: usize,
},
EmbedDiag {
axis_a: usize,
axis_b: usize,
},
Tril {
k: i64,
},
Triu {
k: i64,
},
Gather(GatherConfig),
GatherDynamicSliceSizes {
offset_dims: Vec<usize>,
collapsed_slice_dims: Vec<usize>,
start_index_map: Vec<usize>,
index_vector_dim: usize,
slice_sizes: Vec<DimExpr>,
},
Scatter(ScatterConfig),
Slice(SliceConfig),
DynamicSlice {
slice_sizes: Vec<usize>,
},
DynamicUpdateSlice,
Pad(PadConfig),
Concatenate {
axis: usize,
input_count: usize,
},
Reverse {
axes: Vec<usize>,
},
ShapeOf {
axis: usize,
},
DynamicTruncate {
axis: usize,
},
PadToMatch {
axis: usize,
},
ReduceProd {
axes: Vec<usize>,
},
ReduceMax {
axes: Vec<usize>,
},
ReduceMin {
axes: Vec<usize>,
},
}Expand description
Closed backend-neutral vocabulary of core semantic tensor operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Add
Sub
Mul
Neg
Conj
DotGeneral
Fields
§
config: DotGeneralConfigTranspose
Reshape
BroadcastInDim
Convert
Constant
ReduceSum
ReduceSumSquares
Div
Rem
Abs
Sign
Maximum
Minimum
Compare(CompareDir)
Select
Clamp
Exp
Log
Sin
Cos
Tanh
Sqrt
Rsqrt
Pow
Expm1
Log1p
ExtractDiag
EmbedDiag
Tril
Triu
Gather(GatherConfig)
GatherDynamicSliceSizes
Fields
Scatter(ScatterConfig)
Slice(SliceConfig)
DynamicSlice
DynamicUpdateSlice
Pad(PadConfig)
Concatenate
Reverse
ShapeOf
DynamicTruncate
PadToMatch
ReduceProd
ReduceMax
ReduceMin
Trait Implementations§
Source§impl Clone for CoreSemanticOp
impl Clone for CoreSemanticOp
Source§fn clone(&self) -> CoreSemanticOp
fn clone(&self) -> CoreSemanticOp
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 CoreSemanticOp
impl Debug for CoreSemanticOp
Source§impl From<&CoreSemanticOp> for StdTensorOp
impl From<&CoreSemanticOp> for StdTensorOp
Source§fn from(op: &CoreSemanticOp) -> Self
fn from(op: &CoreSemanticOp) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CoreSemanticOp
impl PartialEq for CoreSemanticOp
Source§fn eq(&self, other: &CoreSemanticOp) -> bool
fn eq(&self, other: &CoreSemanticOp) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<&StdTensorOp> for CoreSemanticOp
impl TryFrom<&StdTensorOp> for CoreSemanticOp
Source§type Error = CoreSemanticOpConversionError
type Error = CoreSemanticOpConversionError
The type returned in the event of a conversion error.
impl StructuralPartialEq for CoreSemanticOp
Auto Trait Implementations§
impl Freeze for CoreSemanticOp
impl RefUnwindSafe for CoreSemanticOp
impl Send for CoreSemanticOp
impl Sync for CoreSemanticOp
impl Unpin for CoreSemanticOp
impl UnsafeUnpin for CoreSemanticOp
impl UnwindSafe for CoreSemanticOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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