pub struct Qwen35Kernels {Show 27 fields
pub rms: KernelHandle,
pub rope: KernelHandle,
pub kvap: KernelHandle,
pub attn: KernelHandle,
pub sg: KernelHandle,
pub add_rms: KernelHandle,
pub qkv_split: KernelHandle,
pub conv1d: KernelHandle,
pub gdn_gate: KernelHandle,
pub sigmoid: KernelHandle,
pub gdn_dec: KernelHandle,
pub kvap_turbo8: KernelHandle,
pub attn_turbo8: KernelHandle,
pub kvap_turbo4: KernelHandle,
pub attn_turbo4: KernelHandle,
pub kvap_turbo3: KernelHandle,
pub attn_turbo3: KernelHandle,
pub kvap_turbo2: KernelHandle,
pub attn_turbo2: KernelHandle,
pub kvap_bf16k_turbo4v: KernelHandle,
pub attn_bf16k_turbo4v: KernelHandle,
pub kvap_bf16k_turbo3v: KernelHandle,
pub attn_bf16k_turbo3v: KernelHandle,
pub kvap_bf16k_turbo2v: KernelHandle,
pub attn_bf16k_turbo2v: KernelHandle,
pub wht: KernelHandle,
pub wht_inv: KernelHandle,
}Expand description
Pre-resolved kernel handles. Resolve once at startup; pass & to
every per-layer call so name-lookup overhead doesn’t appear in the
hot path.
Fields§
§rms: KernelHandle§rope: KernelHandle§kvap: KernelHandle§attn: KernelHandle§sg: KernelHandle§add_rms: KernelHandle§qkv_split: KernelHandle§conv1d: KernelHandle§gdn_gate: KernelHandle§sigmoid: KernelHandle§gdn_dec: KernelHandle§kvap_turbo8: KernelHandleTurboQuant KV cache paths (Turbo8/4/3/2): quantizing appends, dequantizing decode attentions, and the WHT rotation bookends. Resolved unconditionally (the kernels live in the common set) so a turbo cache can never silently fall back to the bf16 kernels.
attn_turbo8: KernelHandle§kvap_turbo4: KernelHandle§attn_turbo4: KernelHandle§kvap_turbo3: KernelHandle§attn_turbo3: KernelHandle§kvap_turbo2: KernelHandle§attn_turbo2: KernelHandle§kvap_bf16k_turbo4v: KernelHandle§attn_bf16k_turbo4v: KernelHandle§kvap_bf16k_turbo3v: KernelHandle§attn_bf16k_turbo3v: KernelHandle§kvap_bf16k_turbo2v: KernelHandle§attn_bf16k_turbo2v: KernelHandle§wht: KernelHandle§wht_inv: KernelHandleImplementations§
Source§impl Qwen35Kernels
impl Qwen35Kernels
Sourcepub fn resolve(gpu: &dyn GpuBackend) -> Result<Self>
pub fn resolve(gpu: &dyn GpuBackend) -> Result<Self>
Look up every kernel the per-layer forward needs. Fails loudly if any are missing — better to surface that at startup than silently mid-decode.
Auto Trait Implementations§
impl Freeze for Qwen35Kernels
impl RefUnwindSafe for Qwen35Kernels
impl Send for Qwen35Kernels
impl Sync for Qwen35Kernels
impl Unpin for Qwen35Kernels
impl UnwindSafe for Qwen35Kernels
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