Trait cubecl_core::frontend::LaunchArgExpand
source · pub trait LaunchArgExpand: CubeType {
// Required method
fn expand(
builder: &mut KernelBuilder,
vectorization: Vectorization,
) -> <Self as CubeType>::ExpandType;
// Provided method
fn expand_output(
builder: &mut KernelBuilder,
vectorization: Vectorization,
) -> <Self as CubeType>::ExpandType { ... }
}
Expand description
Defines how a launch argument can be expanded.
Normally this type should be implemented two times for an argument. Once for the reference and the other for the mutable reference. Often time, the reference should expand the argument as an input while the mutable reference should expand the argument as an output.
Required Methods§
sourcefn expand(
builder: &mut KernelBuilder,
vectorization: Vectorization,
) -> <Self as CubeType>::ExpandType
fn expand( builder: &mut KernelBuilder, vectorization: Vectorization, ) -> <Self as CubeType>::ExpandType
Register an input variable during compilation that fill the KernelBuilder.
Provided Methods§
sourcefn expand_output(
builder: &mut KernelBuilder,
vectorization: Vectorization,
) -> <Self as CubeType>::ExpandType
fn expand_output( builder: &mut KernelBuilder, vectorization: Vectorization, ) -> <Self as CubeType>::ExpandType
Register an output variable during compilation that fill the KernelBuilder.
Object Safety§
This trait is not object safe.