Skip to main content

Runtime

Trait Runtime 

Source
pub trait Runtime<'a> {
    type Model: Model<'a>;
    type Input;
    type Output;

    // Required method
    fn forward<D: Dtype, const RANK: usize>(
        &self,
        model: &Self::Model,
        input: &Self::Input,
    ) -> Result<Self::Output>;
}
Expand description

Executes a Model on some backend.

Required Associated Types§

Source

type Model: Model<'a>

The model type this runtime executes.

Source

type Input

This runtime’s input type.

Source

type Output

This runtime’s output type.

Required Methods§

Source

fn forward<D: Dtype, const RANK: usize>( &self, model: &Self::Model, input: &Self::Input, ) -> Result<Self::Output>

Runs model on input.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§