Skip to main content

Tblis

Struct Tblis 

Source
pub struct Tblis;
Expand description

TBLIS backend.

Implements matrix multiplication and tensor contraction traits from mdarray_linalg by delegating to the TBLIS C library. TBLIS is particularly efficient for high-rank tensor contractions where it avoids the explicit transpositions required by BLAS-based approaches.

This is a zero-sized marker struct — all state is managed by the underlying TBLIS library.

Trait Implementations§

Source§

impl<T> Contract<T> for Tblis
where T: TblisFloatAPI + Zero + One + MulAdd<Output = T>,

Source§

fn matmul<'a, D0, D1, D2, La, Lb>( &self, a: &'a Slice<T, (D0, D1), La>, b: &'a Slice<T, (D1, D2), Lb>, ) -> impl MatmulBuilder<'a, T, D0, D1, D2, La, Lb>
where La: Layout, Lb: Layout, D0: Dim, D1: Dim, D2: Dim,

Matrix multiplication. Read more
Source§

fn contract_all<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, ) -> T
where T: 'a, Sa: Shape, Sb: Shape, La: Layout, Lb: Layout,

Contracts all axes of a with all axes of b. Read more
Source§

fn contract_n<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, n: usize, ) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
where T: 'a, Sa: Shape, Sb: Shape, La: Layout, Lb: Layout,

Contracts the last n axes of a with the first n axes of b. Read more
Source§

fn contract_pairs<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, axes_a: &'a [usize], axes_b: &'a [usize], ) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
where T: 'a, Sa: Shape, Sb: Shape, La: Layout, Lb: Layout,

Contracts explicit pairs of axes. Read more
Source§

fn contract<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, indices_a: &'a [u8], indices_b: &'a [u8], indices_c: &'a [u8], ) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
where T: 'a, Sa: Shape, Sb: Shape, La: Layout, Lb: Layout,

Fully general contraction of two tensors, à la einsum. Read more
Source§

impl Default for Tblis

Source§

fn default() -> Tblis

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Tblis

§

impl RefUnwindSafe for Tblis

§

impl Send for Tblis

§

impl Sync for Tblis

§

impl Unpin for Tblis

§

impl UnsafeUnpin for Tblis

§

impl UnwindSafe for Tblis

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoCloned<T> for T

Source§

fn clone_to(self, target: &mut T)

Moves an existing object or clones from a reference to the target object.
Source§

fn into_cloned(self) -> T

Returns an existing object or a new clone from a reference.
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V