pub enum CpuPlan<T: Scalar> {
BatchedGemm {
batch_dims: Vec<usize>,
m: usize,
n: usize,
k: usize,
_marker: PhantomData<T>,
},
ReduceAdd {
reduced_axes: Vec<usize>,
_marker: PhantomData<T>,
},
Trace {
free_axes: Vec<usize>,
components: Vec<Vec<usize>>,
comp_dims: Vec<usize>,
_marker: PhantomData<T>,
},
AntiTrace {
paired_axes: Vec<(usize, usize)>,
free_axes: Vec<usize>,
components: Vec<Vec<usize>>,
comp_dims: Vec<usize>,
_marker: PhantomData<T>,
},
AntiDiag {
paired_axes: Vec<(usize, usize)>,
free_axes: Vec<usize>,
components: Vec<Vec<usize>>,
comp_dims: Vec<usize>,
generative_comps: Vec<usize>,
_marker: PhantomData<T>,
},
Contract {
modes_a: Vec<u32>,
modes_b: Vec<u32>,
modes_c: Vec<u32>,
gemm_spec: Option<ContractGemmSpec>,
_marker: PhantomData<T>,
},
ElementwiseBinary {
op: SemiringBinaryOp,
_marker: PhantomData<T>,
},
MakeContiguous {
_marker: PhantomData<T>,
},
}Expand description
CPU plan — concrete enum, no type erasure.
Created by the family planners on crate::CpuBackend and consumed by the
semiring family executors.
Variants§
BatchedGemm
Plan for batched GEMM.
Fields
§
_marker: PhantomData<T>ReduceAdd
Plan for semiring-add reduction.
Fields
§
_marker: PhantomData<T>Trace
Plan for trace.
Fields
§
_marker: PhantomData<T>AntiTrace
Plan for anti-trace (AD backward).
Fields
§
_marker: PhantomData<T>AntiDiag
Plan for anti-diag (AD backward).
Fields
§
_marker: PhantomData<T>Contract
Plan for fused contraction.
Fields
§
_marker: PhantomData<T>ElementwiseBinary
Plan for optional semiring binary fast paths.
MakeContiguous
Plan for making a tensor contiguous.
Fields
§
_marker: PhantomData<T>Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CpuPlan<T>
impl<T> RefUnwindSafe for CpuPlan<T>where
T: RefUnwindSafe,
impl<T> Send for CpuPlan<T>
impl<T> Sync for CpuPlan<T>
impl<T> Unpin for CpuPlan<T>where
T: Unpin,
impl<T> UnwindSafe for CpuPlan<T>where
T: UnwindSafe,
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