pub enum Extension {
Contract,
ElementwiseMul,
}Expand description
Extended operation identifiers for dynamic capability query.
Used with TensorPrims::has_extension_for to check at runtime whether
a backend supports an optimized extended operation for a given scalar type.
§Examples
ⓘ
use tenferro_prims::{CpuBackend, TensorPrims, Extension};
// Check if fused contraction is available for f64
let available = CpuBackend::has_extension_for::<f64>(Extension::Contract);Variants§
Contract
Fused contraction (permute + GEMM). Maps to cutensorContract on GPU.
ElementwiseMul
Element-wise multiplication. Maps to cutensorElementwiseBinary on GPU.
Trait Implementations§
impl Copy for Extension
impl Eq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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