pub struct CubeMapping {
pub can_yield_extra_cubes: bool,
/* private fields */
}Expand description
Runtime-side counterpart of CubeCountPlan: given the cube position,
resolves the conceptual (x, y, z) coordinates in problem space.
Each operation is responsible for mapping the returned generic (x, y, z)
tuple to its own domain axes (e.g. matmul interprets them as (m, n, batch),
gemv as (matrix_axis, _, batch), attention as (seq_q, batch_heads, _)).
Fields§
§can_yield_extra_cubes: boolImplementations§
Source§impl CubeMapping
impl CubeMapping
Sourcepub fn num_valid_cubes(&self) -> usize
pub fn num_valid_cubes(&self) -> usize
Returns the number of valid cubes (problem-space volume).
Sourcepub fn cube_pos_to_xyz(&self) -> (u32, u32, u32)
pub fn cube_pos_to_xyz(&self) -> (u32, u32, u32)
Given a cube position, returns the generic problem-space coordinates (x, y, z).
Consumers assign meaning to x/y/z (matmul: m/n/batch, gemv: matrix/_/batch, etc.).
pub fn __expand_num_valid_cubes( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
pub fn __expand_cube_pos_to_xyz( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <(u32, u32, u32) as CubeType>::ExpandType
Trait Implementations§
Source§impl CubeType for CubeMapping
impl CubeType for CubeMapping
type ExpandType = CubeMappingExpand
Source§impl LaunchArg for CubeMapping
impl LaunchArg for CubeMapping
Source§type RuntimeArg<R: Runtime> = CubeMappingLaunch<R>
type RuntimeArg<R: Runtime> = CubeMappingLaunch<R>
The runtime argument for the kernel.
Source§type CompilationArg = CubeMappingCompilationArg
type CompilationArg = CubeMappingCompilationArg
Compilation argument.
fn register<R: Runtime>( arg: Self::RuntimeArg<R>, launcher: &mut KernelLauncher<R>, ) -> Self::CompilationArg
Source§fn expand(
arg: &Self::CompilationArg,
builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
fn expand( arg: &Self::CompilationArg, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register an input variable during compilation that fill the
KernelBuilder.Source§fn expand_output(
arg: &Self::CompilationArg,
builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
fn expand_output( arg: &Self::CompilationArg, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register an output variable during compilation that fill the
KernelBuilder.Auto Trait Implementations§
impl Freeze for CubeMapping
impl RefUnwindSafe for CubeMapping
impl Send for CubeMapping
impl Sync for CubeMapping
impl Unpin for CubeMapping
impl UnsafeUnpin for CubeMapping
impl UnwindSafe for CubeMapping
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
Source§impl<T> ViewLayoutLaunchArg for Twhere
T: LaunchArg,
impl<T> ViewLayoutLaunchArg for Twhere
T: LaunchArg,
Source§type RuntimeArg<R: Runtime> = <T as LaunchArg>::RuntimeArg<R>
type RuntimeArg<R: Runtime> = <T as LaunchArg>::RuntimeArg<R>
The runtime argument for the kernel.
Source§type CompilationArg = <T as LaunchArg>::CompilationArg
type CompilationArg = <T as LaunchArg>::CompilationArg
Compilation argument.
fn register<R, B>( arg: <T as ViewLayoutLaunchArg>::RuntimeArg<R>, _buffer: &B, _ty: Type, launcher: &mut KernelLauncher<R>, ) -> <T as ViewLayoutLaunchArg>::CompilationArg
Source§fn expand(
arg: &<T as ViewLayoutLaunchArg>::CompilationArg,
_ty: Type,
builder: &mut KernelBuilder,
) -> <T as CubeType>::ExpandType
fn expand( arg: &<T as ViewLayoutLaunchArg>::CompilationArg, _ty: Type, builder: &mut KernelBuilder, ) -> <T as CubeType>::ExpandType
Register an input variable during compilation that fill the
KernelBuilder.Source§fn expand_output(
arg: &<T as ViewLayoutLaunchArg>::CompilationArg,
_ty: Type,
builder: &mut KernelBuilder,
) -> <T as CubeType>::ExpandType
fn expand_output( arg: &<T as ViewLayoutLaunchArg>::CompilationArg, _ty: Type, builder: &mut KernelBuilder, ) -> <T as CubeType>::ExpandType
Register an output variable during compilation that fill the
KernelBuilder.