pub fn hc_post_lowrank(
gpu: &dyn GpuBackend,
kernel: KernelHandle,
block_out: DevicePtr,
residual: DevicePtr,
inj: DevicePtr,
out: DevicePtr,
num_tokens: u32,
hidden_size: u32,
hc_mult: u32,
stream: u64,
) -> Result<()>Expand description
Inject the block output back into every stream:
out[t, s*H + d] = residual[t, s*H + d] + block_out[t, d] * inj[t, s].
Note there is no comb argument: DeepSeek mixes streams with a full
[hc, hc] combine matrix on the way back, Qwen scales by one scalar per
stream. Passing a combine matrix here would not type-check, which is the
point of keeping the two launches separate.