pub struct AvailableLineSizes {
pub query: Vec<u8>,
pub key: Vec<u8>,
pub value: Vec<u8>,
pub mask: Vec<u8>,
pub out: Vec<u8>,
}Expand description
Candidate line 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§
§query: Vec<u8>§key: Vec<u8>§value: Vec<u8>§mask: Vec<u8>§out: Vec<u8>Implementations§
Source§impl AvailableLineSizes
impl AvailableLineSizes
pub fn from_elem_types<R: Runtime>( elem_in: usize, elem_mask: usize, elem_out: usize, ) -> Self
Sourcepub fn filter_with_tensor(
self,
ident: AttentionIdent,
strides: &[usize],
shape: &[usize],
) -> Self
pub fn filter_with_tensor( self, ident: AttentionIdent, strides: &[usize], shape: &[usize], ) -> Self
Filter available line sizes considering tensor shapes and strides for ident
Sourcepub fn filter<F>(self, pred: F, ident: AttentionIdent) -> Self
pub fn filter<F>(self, pred: F, ident: AttentionIdent) -> Self
Filter available line sizes for ident
Sourcepub fn pick_max(self) -> Result<AttentionLineSizes, AttentionSetupError>
pub fn pick_max(self) -> Result<AttentionLineSizes, AttentionSetupError>
Pick the largest remaining line size for each tensor
Trait Implementations§
Source§impl Clone for AvailableLineSizes
impl Clone for AvailableLineSizes
Auto Trait Implementations§
impl Freeze for AvailableLineSizes
impl RefUnwindSafe for AvailableLineSizes
impl Send for AvailableLineSizes
impl Sync for AvailableLineSizes
impl Unpin for AvailableLineSizes
impl UnsafeUnpin for AvailableLineSizes
impl UnwindSafe for AvailableLineSizes
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