gdn_decode_wyn_table

Function gdn_decode_wyn_table 

Source
pub fn gdn_decode_wyn_table(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    h_tables: DevicePtr,
    query: DevicePtr,
    key: DevicePtr,
    value: DevicePtr,
    gate: DevicePtr,
    beta: DevicePtr,
    output: DevicePtr,
    hi_tables: DevicePtr,
    slab_entry_stride: u32,
    batch_size: u32,
    num_k_heads: u32,
    num_v_heads: u32,
    k_dim: u32,
    v_dim: u32,
    qk_stride: u32,
    v_stride: u32,
    gb_stride: u32,
    stream: u64,
) -> Result<()>
Expand description

Cross-sequence batched-verify launch of the wyN pointer-table twins (gated_delta_rule_wy{5..16}_table / _f16_table): state_is_table is compiled into the symbol, so the argument list is identical to gdn_decode_wyn — but the STATE arguments mean something different and batching is the point:

  • h_tables = the layer’s staged table slice: slab 0 holds one per-sequence H base pointer per entry (VERIFY_WY_TABLE_SEQS slots).
  • hi_tables = slab 1 (Hi0); consecutive Hi slabs follow at VERIFY_WY_TABLE_SEQS-entry stride.
  • slab_entry_stride MUST be VERIFY_WY_TABLE_SEQS as u32 — the kernel reinterprets the contiguous-form stride argument as “pointer entries between Hi slabs”.

Tables are staged by upload_verify_wy_tables (verify_e2.rs) into a fixed buffer refreshed pre-replay, so the launch is CUDA-graph-stable.