pub struct GpuOutputHead { /* private fields */ }Expand description
The output projection, resident on the GPU.
None from Self::try_build is the ordinary case, not a failure: no GPU,
a weight the kernel does not handle, or a device that cannot bind it. The
caller keeps using the CPU path.
Implementations§
Source§impl GpuOutputHead
impl GpuOutputHead
Sourcepub fn try_build(model: &LoadedModel, executor: &Executor) -> Option<Self>
pub fn try_build(model: &LoadedModel, executor: &Executor) -> Option<Self>
Uploads the model’s output projection if — and only if — every condition for it to be a win holds.
Returns None (never an error) when offload is simply not available:
there is no GPU, the tensor is not Q8_0 (the 1.7B ships Q6_K, which this
kernel does not decode), the tensor is missing, or the adapter cannot
bind it. Every one of those is a normal machine configuration, not a
fault, and the CPU path is always correct.
Auto Trait Implementations§
impl !RefUnwindSafe for GpuOutputHead
impl !UnwindSafe for GpuOutputHead
impl Freeze for GpuOutputHead
impl Send for GpuOutputHead
impl Sync for GpuOutputHead
impl Unpin for GpuOutputHead
impl UnsafeUnpin for GpuOutputHead
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