pub enum StdTensorOp {
Show 55 variants
Add,
Mul,
Neg,
Conj,
DotGeneral(DotGeneralConfig),
Transpose {
perm: Vec<usize>,
},
Reshape {
from_shape: Vec<DimExpr>,
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>,
input_shape: Vec<DimExpr>,
},
Div,
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),
Scatter(ScatterConfig),
Slice(SliceConfig),
DynamicSlice {
slice_sizes: Vec<usize>,
},
Pad(PadConfig),
NaryEinsum {
subscripts: String,
n_inputs: usize,
},
Concatenate {
axis: usize,
},
Reverse {
axes: Vec<usize>,
},
ShapeOf {
axis: usize,
},
DynamicTruncate {
axis: usize,
},
PadToMatch {
axis: usize,
},
ReduceProd {
axes: Vec<usize>,
input_shape: Vec<DimExpr>,
},
ReduceMax {
axes: Vec<usize>,
input_shape: Vec<DimExpr>,
},
ReduceMin {
axes: Vec<usize>,
input_shape: Vec<DimExpr>,
},
Cholesky {
input_shape: Vec<DimExpr>,
},
Lu {
input_shape: Vec<DimExpr>,
},
Svd {
eps: f64,
input_shape: Vec<DimExpr>,
},
Qr {
input_shape: Vec<DimExpr>,
},
Eigh {
eps: f64,
input_shape: Vec<DimExpr>,
},
Eig {
input_dtype: DType,
input_shape: Vec<DimExpr>,
},
TriangularSolve {
left_side: bool,
lower: bool,
transpose_a: bool,
unit_diagonal: bool,
lhs_shape: Vec<DimExpr>,
rhs_shape: Vec<DimExpr>,
},
ValidateNonsingular {
input_shape: Vec<DimExpr>,
},
}Variants§
Add
Mul
Neg
Conj
DotGeneral(DotGeneralConfig)
Transpose
Reshape
BroadcastInDim
Convert
Constant
ReduceSum
Div
Abs
Sign
Maximum
Minimum
Compare(CompareDir)
Select
Clamp
Exp
Log
Sin
Cos
Tanh
Sqrt
Rsqrt
Pow
Expm1
Log1p
ExtractDiag
EmbedDiag
Tril
Triu
Gather(GatherConfig)
Scatter(ScatterConfig)
Slice(SliceConfig)
DynamicSlice
Pad(PadConfig)
NaryEinsum
N-ary einsum kept as a single graph node. Contraction path is optimized at execution time from actual input shapes.
Concatenate
Reverse
ShapeOf
DynamicTruncate
PadToMatch
ReduceProd
ReduceMax
ReduceMin
Cholesky
Lu
Svd
Qr
Eigh
Eig
TriangularSolve
Fields
ValidateNonsingular
Implementations§
Source§impl StdTensorOp
impl StdTensorOp
Sourcepub fn constant_f64(value: f64) -> Self
pub fn constant_f64(value: f64) -> Self
Sourcepub fn constant_f32(value: f32) -> Self
pub fn constant_f32(value: f32) -> Self
Sourcepub fn constant_c64(value: Complex64) -> Self
pub fn constant_c64(value: Complex64) -> Self
Sourcepub fn constant_c32(value: Complex32) -> Self
pub fn constant_c32(value: Complex32) -> Self
Trait Implementations§
Source§impl Clone for StdTensorOp
impl Clone for StdTensorOp
Source§fn clone(&self) -> StdTensorOp
fn clone(&self) -> StdTensorOp
Returns a duplicate of the value. Read more
1.0.0 · 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 StdTensorOp
impl Debug for StdTensorOp
Source§impl GraphOp for StdTensorOp
impl GraphOp for StdTensorOp
Source§impl Hash for StdTensorOp
impl Hash for StdTensorOp
Source§impl PartialEq for StdTensorOp
impl PartialEq for StdTensorOp
Source§impl PrimitiveOp for StdTensorOp
impl PrimitiveOp for StdTensorOp
Source§type ADContext = ShapeGuardContext
type ADContext = ShapeGuardContext
Runtime AD context threaded through linearization and transpose. Read more
Source§fn add() -> Self
fn add() -> Self
Returns the addition operation used for cotangent accumulation
in
tidu::transpose. When multiple cotangents flow to the same
GlobalValKey, transpose emits Op::add() nodes to sum them.Source§impl SemiringOps for StdTensorOp
impl SemiringOps for StdTensorOp
fn add_op() -> Self
fn mul_op() -> Self
fn dot_general(config: DotGeneralConfig) -> Self
fn reduce_sum(axes: Vec<usize>, input_shape: Vec<DimExpr>) -> Self
fn transpose_op(perm: Vec<usize>) -> Self
fn reshape(from_shape: Vec<DimExpr>, to_shape: Vec<DimExpr>) -> Self
fn broadcast_in_dim(shape: Vec<DimExpr>, dims: Vec<usize>) -> Self
fn extract_diag(axis_a: usize, axis_b: usize) -> Self
fn embed_diag(axis_a: usize, axis_b: usize) -> Self
impl Eq for StdTensorOp
impl StructuralPartialEq for StdTensorOp
Auto Trait Implementations§
impl Freeze for StdTensorOp
impl RefUnwindSafe for StdTensorOp
impl Send for StdTensorOp
impl Sync for StdTensorOp
impl Unpin for StdTensorOp
impl UnsafeUnpin for StdTensorOp
impl UnwindSafe for StdTensorOp
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,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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