Expand description
GroupNorm Triton kernels.
GroupNorm partitions C channels into G groups and normalises over each group independently, per sample:
y[n,c,l] = (x[n,c,l] - mean[n,g]) / sqrt(var[n,g] + eps) * γ[c] + β[c]
where g = c / (C / G) is the group index.
Input shape: [N, C, L]. Grid: [N * G] — one CTA per (sample, group).
Each CTA covers channels [g*(C/G), (g+1)*(C/G)) × all L elements,
so the normalised tile has (C/G) * L elements.
BLOCK_NL must be >= (C/G) * L and a power of two.
Structs§
- Group
Norm Backward - GroupNorm backward pass.
- Group
Norm Forward - GroupNorm training forward — saves per-(n,g) mean and rstd.
- Group
Norm Forward Inference - GroupNorm forward (inference).
Functions§
- group_
norm_ backward - GroupNorm backward pass.
- group_
norm_ forward - GroupNorm training forward — saves per-(n,g) mean and rstd.
- group_
norm_ forward_ inference - GroupNorm forward (inference).