hc_post_site

Function hc_post_site 

Source
pub fn hc_post_site(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    hc: &HcWeights,
    block_out: DevicePtr,
    residual: DevicePtr,
    post: DevicePtr,
    comb: DevicePtr,
    out: DevicePtr,
    num_tokens: u32,
    hidden_size: u32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: Inject the block output back into every stream. out may alias residual.

Takes the whole HcWeights rather than a site because neither variant’s hc_post reads site weights: Sinkhorn reads the comb its hc_pre emitted, low-rank the injection vector. The variant is taken from the layer’s attention site.