Trait burn_jit::Runtime

source ·
pub trait Runtime: Send + Sync + 'static + Debug {
    type Compiler: Compiler;
    type Server: ComputeServer<Kernel = Kernel, AutotuneKey = JitAutotuneKey>;
    type Channel: ComputeChannel<Self::Server>;
    type Device: FusionDevice + Default + Hash + PartialEq + Eq + Clone + Debug + Sync + Send;
    type FullPrecisionRuntime: Runtime<Compiler = <Self::Compiler as Compiler>::FullPrecisionCompiler, Device = Self::Device, Server = Self::Server, Channel = Self::Channel>;

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

Runtime for the just-in-time backend.

Required Associated Types§

source

type Compiler: Compiler

The compiler used to compile the inner representation into tokens.

source

type Server: ComputeServer<Kernel = Kernel, AutotuneKey = JitAutotuneKey>

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: FusionDevice + Default + Hash + PartialEq + Eq + Clone + Debug + Sync + Send

The device used to retrieve the compute client.

source

type FullPrecisionRuntime: Runtime<Compiler = <Self::Compiler as Compiler>::FullPrecisionCompiler, Device = Self::Device, Server = Self::Server, Channel = Self::Channel>

A version of the runtime that supports full precision.

Note that the runtime should share all other runtime components. This way, it’s possible to share the same handles for both runtimes and reduce data copies to a minimum.

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.

Object Safety§

This trait is not object safe.

Implementors§