pub fn forward_linear_attention<Q: QuantWeights>(
gpu: &dyn GpuBackend,
cfg: &Qwen35ForwardConfig,
k: &Qwen35Kernels,
layer: &LinearAttentionLayer<'_, Q>,
state: &LinearAttentionState,
scratch: &LinearAttentionScratch,
x_in: DevicePtr,
x_buf: DevicePtr,
stream: u64,
intra_dump: Option<&dyn Fn(&str, DevicePtr, u32) -> Result<()>>,
) -> Result<DevicePtr>Expand description
2026-09-25: Runs one GDN decoder layer for one token and returns x_buf,
into which the layer’s output residual stream (scratch.x_final) is copied.
intra_dump, when given, receives named intermediate buffers after a
stream synchronize.