pub struct GpuBackend { /* private fields */ }Expand description
透明分流的后端。
Implementations§
Source§impl GpuBackend
impl GpuBackend
Trait Implementations§
Source§impl Backend for GpuBackend
impl Backend for GpuBackend
Source§fn matmul(&self, a: &Tensor, b: &Tensor, b_is_weight: bool) -> Option<Vec<f32>>
fn matmul(&self, a: &Tensor, b: &Tensor, b_is_weight: bool) -> Option<Vec<f32>>
a[M, K] · b[K, N],行优先。b_is_weight 表示 b 是长期不变的权重,后端可以缓存。Auto Trait Implementations§
impl !Freeze for GpuBackend
impl !RefUnwindSafe for GpuBackend
impl !UnwindSafe for GpuBackend
impl Send for GpuBackend
impl Sync for GpuBackend
impl Unpin for GpuBackend
impl UnsafeUnpin for GpuBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more