pub enum DegenerateDotKind {
Hadamard,
OuterProduct,
ScalarTranspose,
FullContraction,
}Expand description
The degenerate algebra a DotGeneral actually is when it is not a
contraction, classified from the config and the operand shapes alone.
The semantic rewrite and the eager executor share this rule so a degenerate form is rewritten once, in one place, instead of each backend implementing it implicitly (invariant I4 of the #2112 umbrella).
Variants§
Hadamard
Every axis of both operands is a batch axis, in each operand’s own order, and both operands carry the same dimensions: an elementwise product.
OuterProduct
No contracting and no batch dims, free dims on both sides: an outer product (the concatenated product).
ScalarTranspose
No contracting and no batch dims, free dims on one side only: that operand, permuted into the output’s order and scaled by the other.
FullContraction
Every dimension contracts: a product reduced to rank 0.
Trait Implementations§
Source§impl Clone for DegenerateDotKind
impl Clone for DegenerateDotKind
Source§fn clone(&self) -> DegenerateDotKind
fn clone(&self) -> DegenerateDotKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more