Struct ConvolutionConfig

Source
pub struct ConvolutionConfig<M: GlobalConfig> { /* private fields */ }

Implementations§

Source§

impl<M: GlobalConfig> ConvolutionConfig<M>

Source

pub fn new( matmul: M, kernel_size: &[u32], stride: &[u32], dilation: &[u32], padding: &[i32], dim: Dimensionality, num_stages: u32, ) -> Result<Self, MatmulSetupError>

Source

pub fn to_matmul_config(self) -> M

Trait Implementations§

Source§

impl<M: Clone + GlobalConfig> Clone for ConvolutionConfig<M>

Source§

fn clone(&self) -> ConvolutionConfig<M>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M: GlobalConfig> ConvGemmConfig for ConvolutionConfig<M>

Source§

fn kernel_size(&self, dim: u32) -> u32

The size of the convolution kernel at dim
Source§

fn dilation(&self, dim: u32) -> u32

The dilation of the kernel at dim
Source§

fn stride(&self, dim: u32) -> u32

The stride of the kernel at dim
Source§

fn padding(&self, dim: u32) -> i32

The padding of the kernel at dim
Source§

fn dimensionality(&self) -> Dimensionality

The dimensionality of the kernel
Source§

fn line_sizes(&self) -> MatmulLineSizes

Source§

impl<M: Debug + GlobalConfig> Debug for ConvolutionConfig<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: GlobalConfig> Deref for ConvolutionConfig<M>

Source§

type Target = M

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<M: GlobalConfig> GlobalConfig for ConvolutionConfig<M>

Source§

type StageConfig = <M as GlobalConfig>::StageConfig

Underlying Stage matmul config
Source§

fn stage_config(&self) -> Self::StageConfig

Convert itself to the underlying stage matmul config
Source§

fn global_line_size<I: Into<Ident>>(&self, ident: I) -> u32

Returns the line size for the global memory corresponding to the given ident
Source§

fn matrix_layout<I: Into<Ident>>(&self, ident: I) -> MatrixLayout

Returns the MatrixLayout for the given ident
Source§

fn num_loading_planes<I: Into<Ident>>(&self, ident: I) -> u32

Returns the number of planes participating in loading ident
Source§

fn plane_dim(&self) -> u32

Returns the size of the plane dimension
Source§

fn check_row_bounds<I: Into<Ident>>(&self, ident: I) -> bool

Whether to check if accessing a row would exceed bounds.
Source§

fn check_col_bounds<I: Into<Ident>>(&self, ident: I) -> bool

Whether to check if accessing a col would exceed bounds.
Source§

fn check_k_bounds(&self) -> bool

Whether to check if accessing a col for lhs or row for rhs would exceed bounds.
Source§

fn precompute_job(&self) -> bool

Whether to put common computations for loading tasks once before loop
Source§

fn num_stages(&self, _ident: InputIdent) -> u32

The number of stages in stage memory
Source§

fn loader_mode(&self) -> LoaderMode

Whether to check loader is balanced in comptime or runtime. Read more
Source§

fn tiling_scheme(&self) -> TilingScheme

Returns the TilingScheme
Source§

fn event_loading_mode(&self, ident: InputIdent) -> EventLoadingMode

Whether event loading is constrained to be ordered
Source§

fn plane_role_config(&self) -> PlaneRoleConfig

Indicates the specialization roles for the planes
Source§

fn specialized_loading_sides(&self) -> SpecializedLoadingSides

Indicates plane roles are associated to loading which tensor input
Source§

fn cube_dim(&self) -> CubeDim

The CubeDim arising from the TilingScheme
Source§

fn role_rule_config(&self) -> RoleRuleConfig

How to identify the role of the plane depending on its index
Source§

fn quantized(&self) -> bool

Whether the matmul is quantized
Source§

impl<M: Hash + GlobalConfig> Hash for ConvolutionConfig<M>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<M: PartialEq + GlobalConfig> PartialEq for ConvolutionConfig<M>

Source§

fn eq(&self, other: &ConvolutionConfig<M>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<M: Copy + GlobalConfig> Copy for ConvolutionConfig<M>

Source§

impl<M: Eq + GlobalConfig> Eq for ConvolutionConfig<M>

Source§

impl<M: GlobalConfig> StructuralPartialEq for ConvolutionConfig<M>

Auto Trait Implementations§

§

impl<M> Freeze for ConvolutionConfig<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for ConvolutionConfig<M>
where M: RefUnwindSafe,

§

impl<M> Send for ConvolutionConfig<M>

§

impl<M> Sync for ConvolutionConfig<M>

§

impl<M> Unpin for ConvolutionConfig<M>
where M: Unpin,

§

impl<M> UnwindSafe for ConvolutionConfig<M>
where M: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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

Source§

impl<T> CubeComptime for T
where T: Debug + Hash + Eq + Clone + Copy,