Struct SimpleTmaConvolution

Source
pub struct SimpleTmaConvolution<MP: MatmulPrecision, SMM: StageMatmul<MP>> { /* private fields */ }
Expand description

Performs matrix multiplication at the global level, with each plane sharing the same responsibilities

  • All planes load data to the stage
  • All planes are used in the stage matmul computation

Trait Implementations§

Source§

impl<MP: MatmulPrecision, SMM> Convolution<MP> for SimpleTmaConvolution<MP, SMM>
where SMM: StageMatmul<MP, LhsReader = FullReader<MP::ES, TmaIm2colTiling>, RhsReader = FullReader<MP::ES, TmaWeightTiling>>,

Source§

type LhsLoader = TmaIm2colLoader<MP, <SimpleTmaConvolution<MP, SMM> as Convolution<MP>>::Config>

Source§

type Config = HomogeneousConfig<Config<<SMM as StageMatmul<MP>>::Config>>

Source§

type RhsLoader = TmaWeightLoader<MP, <SMM as StageMatmul<MP>>::Config>

Source§

type AccumulatorLoader = BiasLoader<MP>

Source§

type Out = Unloader<<MP as MatmulPrecision>::EO>

Source§

type Accumulator = <SMM as StageMatmul<MP>>::Accumulator

Source§

fn execute( lhs_loader: Self::LhsLoader, rhs_loader: Self::RhsLoader, acc_loader: Self::AccumulatorLoader, out_unloader: Self::Out, acc: &mut Self::Accumulator, k_range: (u32, u32), config: Self::Config, )

Performs the convolution over data loaded by the LHS and RHS loaders, over the range given for K, and stores with using the output unloader. Read more
Source§

fn init_lhs_loader( lhs: VirtualTensor<MP::EI>, x_offset: u32, y_offset: u32, runtime_args: &RuntimeArgs, config: Self::Config, ) -> Self::LhsLoader

Source§

fn init_rhs_loader( rhs: VirtualTensor<MP::EI>, x_offset: u32, y_offset: u32, runtime_args: &RuntimeArgs, config: Self::Config, ) -> Self::RhsLoader

Source§

fn init_bias_loader( bias: CubeOption<VirtualTensor<MP::EO>>, n_offset: u32, config: Self::Config, ) -> Self::AccumulatorLoader

Source§

fn init_unloader( out: VirtualTensor<MP::EO, ReadWrite>, x_offset: u32, y_offset: u32, ) -> Self::Out

Source§

fn init_accumulator(config: Self::Config) -> Self::Accumulator

Source§

fn __expand_execute( context: &mut Scope, lhs_loader: <Self::LhsLoader as CubeType>::ExpandType, rhs_loader: <Self::RhsLoader as CubeType>::ExpandType, acc_loader: <Self::AccumulatorLoader as CubeType>::ExpandType, out_unloader: <Self::Out as CubeType>::ExpandType, acc: <Self::Accumulator as CubeType>::ExpandType, k_range: <(u32, u32) as CubeType>::ExpandType, config: Self::Config, ) -> <() as CubeType>::ExpandType

Source§

fn __expand_init_lhs_loader( context: &mut Scope, lhs: <VirtualTensor<MP::EI> as CubeType>::ExpandType, x_offset: <u32 as CubeType>::ExpandType, y_offset: <u32 as CubeType>::ExpandType, runtime_args: <RuntimeArgs as CubeType>::ExpandType, config: Self::Config, ) -> <Self::LhsLoader as CubeType>::ExpandType

Source§

fn __expand_init_rhs_loader( context: &mut Scope, rhs: <VirtualTensor<MP::EI> as CubeType>::ExpandType, x_offset: <u32 as CubeType>::ExpandType, y_offset: <u32 as CubeType>::ExpandType, runtime_args: <RuntimeArgs as CubeType>::ExpandType, config: Self::Config, ) -> <Self::RhsLoader as CubeType>::ExpandType

Source§

fn __expand_init_bias_loader( context: &mut Scope, bias: <CubeOption<VirtualTensor<MP::EO>> as CubeType>::ExpandType, n_offset: <u32 as CubeType>::ExpandType, config: Self::Config, ) -> <Self::AccumulatorLoader as CubeType>::ExpandType

Source§

fn __expand_init_unloader( context: &mut Scope, out: <VirtualTensor<MP::EO, ReadWrite> as CubeType>::ExpandType, x_offset: <u32 as CubeType>::ExpandType, y_offset: <u32 as CubeType>::ExpandType, ) -> <Self::Out as CubeType>::ExpandType

Source§

fn __expand_init_accumulator( context: &mut Scope, config: Self::Config, ) -> <Self::Accumulator as CubeType>::ExpandType

Auto Trait Implementations§

§

impl<MP, SMM> Freeze for SimpleTmaConvolution<MP, SMM>

§

impl<MP, SMM> RefUnwindSafe for SimpleTmaConvolution<MP, SMM>
where MP: RefUnwindSafe, SMM: RefUnwindSafe,

§

impl<MP, SMM> Send for SimpleTmaConvolution<MP, SMM>

§

impl<MP, SMM> Sync for SimpleTmaConvolution<MP, SMM>

§

impl<MP, SMM> Unpin for SimpleTmaConvolution<MP, SMM>
where MP: Unpin, SMM: Unpin,

§

impl<MP, SMM> UnwindSafe for SimpleTmaConvolution<MP, SMM>
where MP: UnwindSafe, SMM: UnwindSafe,

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<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, 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