Skip to main content

AsyncTensorOps

Trait AsyncTensorOps 

Source
pub trait AsyncTensorOps: TensorOps {
    // Required methods
    fn matmul_async<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        a: &'life1 TensorRef,
        b: &'life2 TensorRef,
    ) -> Pin<Box<dyn Future<Output = Result<TensorRef>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn softmax_async<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tensor: &'life1 TensorRef,
        dim: i32,
    ) -> Pin<Box<dyn Future<Output = Result<TensorRef>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn synchronize<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

GPU-specific tensor operations

Required Methods§

Source

fn matmul_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, a: &'life1 TensorRef, b: &'life2 TensorRef, ) -> Pin<Box<dyn Future<Output = Result<TensorRef>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Asynchronous matrix multiplication

Source

fn softmax_async<'life0, 'life1, 'async_trait>( &'life0 self, tensor: &'life1 TensorRef, dim: i32, ) -> Pin<Box<dyn Future<Output = Result<TensorRef>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Asynchronous softmax

Source

fn synchronize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Synchronize all pending operations

Implementors§