Qwen35Kernels

Struct Qwen35Kernels 

Source
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: KernelHandle

TurboQuant 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: KernelHandle

Implementations§

Source§

impl Qwen35Kernels

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more