pub trait KernelExecutor: Send + Sync {
// Required methods
fn load_kernel<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
source: &'life1 str,
name: &'life2 str,
device: &'life3 Device,
) -> Pin<Box<dyn Future<Output = Result<KernelHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn execute_kernel<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: KernelHandle,
grid_size: (u32, u32, u32),
block_size: (u32, u32, u32),
args: &'life1 [KernelArg],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_kernel_info(&self, handle: KernelHandle) -> Option<KernelInfo>;
fn unload_kernel<'life0, 'async_trait>(
&'life0 self,
handle: KernelHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Kernel executor for custom GPU kernels
Required Methods§
Sourcefn load_kernel<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
source: &'life1 str,
name: &'life2 str,
device: &'life3 Device,
) -> Pin<Box<dyn Future<Output = Result<KernelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn load_kernel<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
source: &'life1 str,
name: &'life2 str,
device: &'life3 Device,
) -> Pin<Box<dyn Future<Output = Result<KernelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Load kernel from source code
Sourcefn execute_kernel<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: KernelHandle,
grid_size: (u32, u32, u32),
block_size: (u32, u32, u32),
args: &'life1 [KernelArg],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_kernel<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: KernelHandle,
grid_size: (u32, u32, u32),
block_size: (u32, u32, u32),
args: &'life1 [KernelArg],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute kernel with arguments
Sourcefn get_kernel_info(&self, handle: KernelHandle) -> Option<KernelInfo>
fn get_kernel_info(&self, handle: KernelHandle) -> Option<KernelInfo>
Get kernel information
Sourcefn unload_kernel<'life0, 'async_trait>(
&'life0 self,
handle: KernelHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unload_kernel<'life0, 'async_trait>(
&'life0 self,
handle: KernelHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unload kernel