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§

source

fn expand( builder: &mut KernelBuilder, vectorization: Vectorization, ) -> <Self as CubeType>::ExpandType

Register an input variable during compilation that fill the KernelBuilder.

Provided Methods§

source

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.

Implementations on Foreign Types§

source§

impl LaunchArgExpand for ()

source§

fn expand( _builder: &mut KernelBuilder, _vectorization: Vectorization, ) -> <Self as CubeType>::ExpandType

Implementors§