pub trait RingKernelRuntime: Send + Sync {
// Required methods
fn backend(&self) -> Backend;
fn is_backend_available(&self, backend: Backend) -> bool;
fn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
kernel_id: &'life1 str,
options: LaunchOptions,
) -> Pin<Box<dyn Future<Output = Result<KernelHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_kernel(&self, kernel_id: &KernelId) -> Option<KernelHandle>;
fn list_kernels(&self) -> Vec<KernelId>;
fn metrics(&self) -> RuntimeMetrics;
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Backend-agnostic runtime trait for kernel management.
This trait is implemented by each backend (CPU, CUDA, Metal, WebGPU) to provide kernel lifecycle management and message passing.
Required Methods§
Sourcefn is_backend_available(&self, backend: Backend) -> bool
fn is_backend_available(&self, backend: Backend) -> bool
Check if a specific backend is available.
Sourcefn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
kernel_id: &'life1 str,
options: LaunchOptions,
) -> Pin<Box<dyn Future<Output = Result<KernelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
kernel_id: &'life1 str,
options: LaunchOptions,
) -> Pin<Box<dyn Future<Output = Result<KernelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Launch a kernel.
Sourcefn get_kernel(&self, kernel_id: &KernelId) -> Option<KernelHandle>
fn get_kernel(&self, kernel_id: &KernelId) -> Option<KernelHandle>
Get a handle to an existing kernel.
Sourcefn list_kernels(&self) -> Vec<KernelId>
fn list_kernels(&self) -> Vec<KernelId>
List all kernel IDs.
Sourcefn metrics(&self) -> RuntimeMetrics
fn metrics(&self) -> RuntimeMetrics
Get runtime metrics.