qknorm_rope ¶
Fused per-head RMSNorm and partial rotary embedding for MiniMax H3.
Functions:¶
fastvideo.models.dits.minimax_h3_fusions.qknorm_rope.fused_qknorm_rope ¶
fused_qknorm_rope(x: Tensor, weight: Tensor, cos: Tensor, sin: Tensor, eps: float) -> Tensor
Run per-head RMSNorm and partial RoPE in one Sol-Engine-style kernel.
RMSNorm reduction and RoPE arithmetic stay in FP32 registers until the final store. Triton's reduction order and the absence of eager's BF16 intermediate materializations can produce small, expected rounding drift.
Row offsets are computed in int64, so inputs beyond 2**31 total elements (about 300k tokens per rank at H3's 56 heads x 128 head_dim) address correctly.