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§
sourcetype Server: ComputeServer<Kernel = Kernel, AutotuneKey = JitAutotuneKey>
type Server: ComputeServer<Kernel = Kernel, AutotuneKey = JitAutotuneKey>
The compute server used to run kernels and perform autotuning.
sourcetype Channel: ComputeChannel<Self::Server>
type Channel: ComputeChannel<Self::Server>
The channel used to communicate with the compute server.
sourcetype Device: FusionDevice + Default + Hash + PartialEq + Eq + Clone + Debug + Sync + Send
type Device: FusionDevice + Default + Hash + PartialEq + Eq + Clone + Debug + Sync + Send
The device used to retrieve the compute client.
sourcetype FullPrecisionRuntime: Runtime<Compiler = <Self::Compiler as Compiler>::FullPrecisionCompiler, Device = Self::Device, Server = Self::Server, Channel = Self::Channel>
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§
Object Safety§
This trait is not object safe.