pub fn psa_merge_attn_backward<T: Triton, D: Float, const KEY_DIM: i32>(
d_merged_ptr: T::Pointer<D>,
d_lo_ptr: T::Pointer<D>,
d_hi_ptr: T::Pointer<D>,
c: i32,
H: i32,
W: i32,
num_heads: i32,
)Expand description
Backward of psa_merge_attn_nchw: scatters d_merged back to d_lo and
d_hi flat buffers.
Grid / block matches the forward: [BH * N, 1, 1], block [KEY_DIM, 1, 1].
Regular stores are safe: each (bh, n, d) position maps to a unique merged
channel, so d_lo and d_hi receive no overlapping writes.