Skip to main content

KernelExecutor

Trait KernelExecutor 

Source
pub trait KernelExecutor:
    Debug
    + Send
    + Sync {
    // Required methods
    fn execute(&self, inputs: &KernelInputs) -> Result<KernelOutputs>;
    fn estimate_execution_time(&self, inputs: &KernelInputs) -> Duration;
    fn can_handle(&self, inputs: &KernelInputs) -> bool;
    fn get_resource_requirements(
        &self,
        inputs: &KernelInputs,
    ) -> ResourceRequirements;
}
Expand description

Kernel executor interface

Required Methods§

Source

fn execute(&self, inputs: &KernelInputs) -> Result<KernelOutputs>

Execute the kernel with given inputs

Source

fn estimate_execution_time(&self, inputs: &KernelInputs) -> Duration

Get estimated execution time

Source

fn can_handle(&self, inputs: &KernelInputs) -> bool

Check if kernel can handle given inputs

Source

fn get_resource_requirements( &self, inputs: &KernelInputs, ) -> ResourceRequirements

Get kernel resource requirements

Implementors§