pub trait JitBackendImpl: Send + Sync {
// Required methods
fn compile_kernel(
&self,
source: &KernelSource,
config: &JitConfig,
) -> Result<CompiledKernel, JitError>;
fn execute_kernel(
&self,
kernel: &CompiledKernel,
inputs: &[&dyn Any],
outputs: &mut [&mut dyn Any],
) -> Result<ExecutionProfile, JitError>;
fn is_available(&self) -> bool;
fn get_capabilities(&self) -> BackendCapabilities;
}Expand description
JIT backend implementation trait
Required Methods§
Sourcefn compile_kernel(
&self,
source: &KernelSource,
config: &JitConfig,
) -> Result<CompiledKernel, JitError>
fn compile_kernel( &self, source: &KernelSource, config: &JitConfig, ) -> Result<CompiledKernel, JitError>
Compile kernel source to binary
Sourcefn execute_kernel(
&self,
kernel: &CompiledKernel,
inputs: &[&dyn Any],
outputs: &mut [&mut dyn Any],
) -> Result<ExecutionProfile, JitError>
fn execute_kernel( &self, kernel: &CompiledKernel, inputs: &[&dyn Any], outputs: &mut [&mut dyn Any], ) -> Result<ExecutionProfile, JitError>
Execute compiled kernel
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if backend is available
Sourcefn get_capabilities(&self) -> BackendCapabilities
fn get_capabilities(&self) -> BackendCapabilities
Get backend capabilities