deinterleave_qg_split_qnorm_mrope

Function deinterleave_qg_split_qnorm_mrope 

Source
pub fn deinterleave_qg_split_qnorm_mrope(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    data: DevicePtr,
    q_out: DevicePtr,
    q_norm_weight: DevicePtr,
    pos_t: DevicePtr,
    pos_h: DevicePtr,
    pos_w: DevicePtr,
    num_tokens: u32,
    num_heads: u32,
    head_dim: u32,
    stride: u32,
    rotary_dim: u32,
    eps: f32,
    theta: f32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: deinterleave_qg_split_qnorm plus rotate-half MRoPE on the first rotary_dim dimensions of each Q head, using the per-token positions pos_t / pos_h / pos_w.

The gate goes to data[q_total..]; Q is deinterleaved, normalized, rotated, then written to q_out. The interleaved-MRoPE prefill (cache_skip.rs) launches it under METRALE_ATTN_PREFILL_FUSED_QROPE=1.