Trait cubecl_core::codegen::Compiler

source ·
pub trait Compiler:
    Sync
    + Send
    + 'static
    + Clone
    + Default
    + Debug {
    type Representation: CompilerRepresentation;

    // Required methods
    fn compile(
        kernel: KernelDefinition,
        mode: ExecutionMode,
    ) -> Self::Representation;
    fn elem_size(elem: Elem) -> usize;
    fn max_shared_memory_size() -> usize;
}
Expand description

Compiles the representation into its own representation that can be formatted into tokens.

Required Associated Types§

source

type Representation: CompilerRepresentation

The representation for the compiled code.

Required Methods§

source

fn compile( kernel: KernelDefinition, mode: ExecutionMode, ) -> Self::Representation

Compiles the kernel definition into the compiler’s representation.

source

fn elem_size(elem: Elem) -> usize

The size of the given element in bytes.

source

fn max_shared_memory_size() -> usize

The maximal size of a shared memory

Object Safety§

This trait is not object safe.

Implementors§