pub struct MatmulProblem {
pub m: usize,
pub n: usize,
pub k: usize,
pub batches: (Vec<usize>, Vec<usize>),
pub lhs_layout: MatrixLayout,
pub rhs_layout: MatrixLayout,
pub lhs_line_size: u8,
pub rhs_line_size: u8,
pub out_line_size: u8,
}
Expand description
Description of a matmul problem to solve, regardless of actual data
Fields§
§m: usize
§n: usize
§k: usize
§batches: (Vec<usize>, Vec<usize>)
§lhs_layout: MatrixLayout
§rhs_layout: MatrixLayout
§lhs_line_size: u8
§rhs_line_size: u8
§out_line_size: u8
Implementations§
Source§impl MatmulProblem
impl MatmulProblem
Sourcepub fn check_config<B: BatchConfig>(
&self,
config: &B,
) -> Result<(), MatmulInvalidProblem>
pub fn check_config<B: BatchConfig>( &self, config: &B, ) -> Result<(), MatmulInvalidProblem>
Asserts that the problem can be solved with the given batch matmul configs
§Panics:
- If dimensions of the problem are larger than allowed by the config
- If line sizes do not divide well the dimension in which they are aligned
Trait Implementations§
Source§impl Clone for MatmulProblem
impl Clone for MatmulProblem
Source§fn clone(&self) -> MatmulProblem
fn clone(&self) -> MatmulProblem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for MatmulProblem
impl RefUnwindSafe for MatmulProblem
impl Send for MatmulProblem
impl Sync for MatmulProblem
impl Unpin for MatmulProblem
impl UnwindSafe for MatmulProblem
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