pub fn deinterleave_qg(
gpu: &dyn GpuBackend,
kernel: KernelHandle,
data: DevicePtr,
num_tokens: u32,
num_heads: u32,
head_dim: u32,
stride: u32,
stream: u64,
) -> Result<()>Expand description
Deinterleave Q/Gate from per-head interleaved to contiguous layout (in-place).
Input layout: [Q_h0(hd), G_h0(hd), Q_h1(hd), G_h1(hd), …] Output layout: [Q_h0(hd), Q_h1(hd), …, G_h0(hd), G_h1(hd), …]
Kernel: deinterleave_qg(data, num_heads, head_dim)
Grid: (1, 1, 1) Block: (256, 1, 1)
Dynamic shared memory: num_heads * head_dim * 2 * 2 bytes