pub enum Op<T: DType> {
Fill {
v: T,
},
Arange {
start: T,
step: T,
stop: T,
},
BinaryOp {
l_id: GraphTensorId,
r_id: GraphTensorId,
operator: BinaryOpType,
},
UnaryOp {
v_id: GraphTensorId,
operator: UnaryOpType,
},
FusedMulAdd {
a_id: GraphTensorId,
b_id: GraphTensorId,
c_id: GraphTensorId,
},
MatMul {
l_id: GraphTensorId,
r_id: GraphTensorId,
o_id: Option<GraphTensorId>,
k: usize,
alpha: T,
beta: T,
},
Rand,
Randn {
mean: T,
std: T,
},
Permute {
v_id: GraphTensorId,
},
NoOp,
}
Variants§
Fill
Fields
§
v: T
Arange
BinaryOp
UnaryOp
FusedMulAdd
a * b + c
MatMul
(B x M x K) * (B x K x N) = (B x M x N) out = out * alpha + beta * lhs * rhs
Rand
Fill with uniform random values in [0, 1).
Randn
Fill with normally distributed random values (mean, std).
Permute
Fields
§
v_id: GraphTensorId
NoOp
Trait Implementations§
impl<T: DType> StructuralPartialEq for Op<T>
Auto Trait Implementations§
impl<T> Freeze for Op<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Op<T>
impl<T> !Send for Op<T>
impl<T> !Sync for Op<T>
impl<T> Unpin for Op<T>where
T: Unpin,
impl<T> !UnwindSafe for Op<T>
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