The _adjust_group_norm_scalars function counts DTensorSpec args to find
where the N/C/HxW scalar args start. When weight or bias is None (e.g.
GroupNorm with affine=False), the None slots are not DTensorSpec, so the
count is too low and the adjuster overwrites the None weight slot with
the local N value. This causes a RuntimeError: expected Optional[Tensor]
but got int.
Fix by counting None slots alongside DTensorSpec when computing the
offset. Adds a regression test for group_norm with weight=None.
Fixes #184816
Authored by Claude.