pub trait Backend: Backend {
    // Provided methods
    fn qkv_attention(
        q: Self::TensorPrimitive<3>,
        k: Self::TensorPrimitive<3>,
        v: Self::TensorPrimitive<3>,
        mask: Option<Self::TensorPrimitive<2>>,
        n_head: usize
    ) -> Self::TensorPrimitive<3> { ... }
    fn attn_decoder_mask(
        seq_length: usize,
        device: &Self::Device
    ) -> Self::TensorPrimitive<2> { ... }
}

Provided Methods§

source

fn qkv_attention( q: Self::TensorPrimitive<3>, k: Self::TensorPrimitive<3>, v: Self::TensorPrimitive<3>, mask: Option<Self::TensorPrimitive<2>>, n_head: usize ) -> Self::TensorPrimitive<3>

source

fn attn_decoder_mask( seq_length: usize, device: &Self::Device ) -> Self::TensorPrimitive<2>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Backend for Wgpu<AutoGraphicsApi, f32, i32>

source§

impl<B: Backend> Backend for Autodiff<B>

Implementors§