pub struct AvailableVectorSizes {
pub lhs: Vec<VectorSize>,
pub rhs: Vec<VectorSize>,
pub out: Vec<VectorSize>,
}Expand description
Candidate vector sizes supported for each tensor.
These lists begin with compiler-supported sizes and are progressively filtered based on problem shape divisibility and hardware constraints.
Fields§
§lhs: Vec<VectorSize>§rhs: Vec<VectorSize>§out: Vec<VectorSize>Implementations§
Source§impl AvailableVectorSizes
impl AvailableVectorSizes
pub fn from_type_size_tma<R: Runtime>( client: &ComputeClient<R>, elem_out: usize, ) -> Self
pub fn from_type_sizes<R: Runtime>( client: &ComputeClient<R>, elem_lhs: usize, elem_rhs: usize, elem_out: usize, ) -> Self
Sourcepub fn filter_lhs_with_tensor(
self,
strides: &Strides,
shape: &Shape,
layout: MatrixLayout,
) -> Self
pub fn filter_lhs_with_tensor( self, strides: &Strides, shape: &Shape, layout: MatrixLayout, ) -> Self
Filter available vector sizes considering tensor shapes and strides for Lhs
Sourcepub fn filter_rhs_with_tensor(
self,
strides: &Strides,
shape: &Shape,
layout: MatrixLayout,
) -> Self
pub fn filter_rhs_with_tensor( self, strides: &Strides, shape: &Shape, layout: MatrixLayout, ) -> Self
Filter available vector sizes considering tensor shapes and strides for Rhs
Sourcepub fn filter_out_with_tensor(self, strides: &Strides, shape: &Shape) -> Self
pub fn filter_out_with_tensor(self, strides: &Strides, shape: &Shape) -> Self
Filter available vector sizes considering tensor shapes and strides for output
Sourcepub fn filter_lhs<F>(self, pred: F) -> Self
pub fn filter_lhs<F>(self, pred: F) -> Self
Filter available vector sizes for Lhs
Sourcepub fn filter_rhs<F>(self, pred: F) -> Self
pub fn filter_rhs<F>(self, pred: F) -> Self
Filter available vector sizes for Rhs
Sourcepub fn filter_out<F>(self, pred: F) -> Self
pub fn filter_out<F>(self, pred: F) -> Self
Filter available vector sizes for output
Sourcepub fn pick_max(self) -> Result<MatmulVectorSizes, MatmulSetupError>
pub fn pick_max(self) -> Result<MatmulVectorSizes, MatmulSetupError>
Pick the largest remaining vector size for each tensor
Trait Implementations§
Source§impl Clone for AvailableVectorSizes
impl Clone for AvailableVectorSizes
Auto Trait Implementations§
impl Freeze for AvailableVectorSizes
impl RefUnwindSafe for AvailableVectorSizes
impl Send for AvailableVectorSizes
impl Sync for AvailableVectorSizes
impl Unpin for AvailableVectorSizes
impl UnsafeUnpin for AvailableVectorSizes
impl UnwindSafe for AvailableVectorSizes
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