Trait cubecl_core::prelude::Runtime

source ·
pub trait Runtime:
    Send
    + Sync
    + 'static
    + Debug {
    type Compiler: Compiler;
    type Server: ComputeServer<Kernel = Box<dyn CubeTask>, DispatchOptions = CubeCount<Self::Server>, FeatureSet = FeatureSet>;
    type Channel: ComputeChannel<Self::Server>;
    type Device;

    // Required methods
    fn client(
        device: &Self::Device,
    ) -> ComputeClient<Self::Server, Self::Channel>;
    fn name() -> &'static str;

    // Provided method
    fn require_array_lengths() -> bool { ... }
}
Expand description

Runtime for the CubeCL.

Required Associated Types§

source

type Compiler: Compiler

The compiler used to compile the inner representation into tokens.

source

type Server: ComputeServer<Kernel = Box<dyn CubeTask>, DispatchOptions = CubeCount<Self::Server>, FeatureSet = FeatureSet>

The compute server used to run kernels and perform autotuning.

source

type Channel: ComputeChannel<Self::Server>

The channel used to communicate with the compute server.

source

type Device

The device used to retrieve the compute client.

Required Methods§

source

fn client(device: &Self::Device) -> ComputeClient<Self::Server, Self::Channel>

Retrieve the compute client from the runtime device.

source

fn name() -> &'static str

The runtime name.

Provided Methods§

source

fn require_array_lengths() -> bool

Return true if global input array lengths should be added to kernel info.

Object Safety§

This trait is not object safe.

Implementors§