when group number is 2,and channel is 2, dim H and dim W is 1, N is 10,the result should be 0,but now it is not 0
Labels: needs reproduction, module: nn, triaged

### 🐛 Describe the bug

>>> import torch
>>> I = nn.GroupNorm(27,27)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'nn' is not defined
>>> I = torch.nn.GroupNorm(27,27)
>>> a = randn(7,27)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'randn' is not defined
>>> a = torch.randn(7,27)
>>> torch.manual_seed(5)
<torch._C.Generator object at 0x7f4f1834ecd0>
>>> a = torch.randn(7,27)
>>> I(a)
tensor([[ 1.2420e-06, 4.4450e-06, 2.8146e-05, -2.7697e-05, -2.7378e-05,
2.4824e-06, 3.0881e-07, -1.2316e-05, 1.3925e-06, -2.2128e-07,
-6.3924e-07, -2.2589e-06, -1.4301e-05, 7.2754e-06, -5.9164e-06,
-7.5575e-06, 5.4801e-06, -1.0688e-05, -3.2239e-06, -6.6209e-06,
1.5516e-08, 1.4135e-06, 1.4828e-06, -2.2104e-07, -7.4949e-06,
3.0266e-06, 1.6571e-07],
[ 1.3628e-05, 6.1235e-06, 3.9398e-06, 2.9506e-06, -1.7197e-05,
-3.2242e-07, 6.8471e-06, 1.8621e-05, 1.5777e-06, -1.8100e-05,
3.0841e-06, -1.2667e-05, -2.3845e-05, -3.8274e-07, -1.3123e-05,
1.8532e-07, -2.5002e-05, 1.4786e-05, -3.5292e-06, 4.6312e-06,
-1.9182e-05, 1.0847e-05, 1.4511e-06, -3.7718e-06, 1.2998e-05,
1.6685e-06, -9.0398e-07],
[-3.1831e-06, 1.4123e-05, 8.5552e-06, -1.4640e-05, 1.6709e-05,
-6.3199e-07, -1.5356e-06, -7.1696e-06, 2.7216e-06, -4.6709e-07,
-5.7627e-06, -6.7139e-06, -2.5343e-06, 8.6930e-06, 3.7191e-07,
-4.7174e-07, -5.8475e-06, 1.8038e-06, 2.7000e-06, 7.4899e-06,
-1.5217e-06, -1.7065e-06, 1.6060e-05, 1.6792e-06, -2.2474e-05,
7.8671e-07, 1.2854e-05],
[ 6.3056e-07, 2.7398e-06, -7.0782e-06, -3.6881e-07, -2.0484e-06,
-7.2676e-06, -1.3552e-06, -2.5187e-06, -2.5435e-06, -1.1345e-05,
6.4821e-06, 1.4438e-05, -4.5725e-07, -8.0922e-07, -8.1018e-07,
-9.8973e-06, -4.4933e-07, 1.0686e-05, -6.4787e-06, 1.0367e-05,
2.2368e-06, 4.6794e-07, -1.4239e-06, 1.9035e-06, 1.0057e-05,
-3.8203e-06, 1.3498e-05],
[-9.5793e-07, -1.1093e-06, 5.8058e-06, 2.2553e-06, -1.2267e-06,
-3.7207e-06, -5.9217e-06, 6.5989e-06, -1.0802e-07, -1.1834e-05,
1.5252e-05, -3.0359e-06, 1.1093e-06, -1.1412e-05, 8.8085e-06,
3.8818e-06, 2.8706e-06, 1.6555e-06, 2.7609e-05, 2.8201e-08,
2.6906e-06, 1.4979e-05, -5.7026e-07, -5.8951e-07, 6.7806e-06,
4.1802e-06, 4.3913e-07],
[-1.5025e-05, -4.5446e-06, -3.5332e-06, 2.6579e-06, 1.3302e-06,
-6.0469e-06, 2.1574e-06, 4.8372e-06, -1.7929e-05, -9.9434e-06,
2.1165e-07, -5.5064e-06, -1.2874e-05, 1.3432e-05, -4.8724e-06,
-2.4987e-06, -6.0053e-07, 1.6070e-06, -1.7542e-05, -1.2139e-06,
-9.6766e-08, 3.4656e-06, 3.0953e-07, -1.6683e-06, -7.7117e-06,
-8.4427e-07, -1.5087e-05],
[ 6.0170e-06, -1.2650e-06, -1.0803e-05, -2.4405e-06, -4.0247e-06,
1.1792e-05, 1.3692e-05, -1.0577e-05, -3.6142e-06, 1.1554e-06,
-2.4077e-05, 2.3481e-06, 1.5554e-06, -3.3266e-08, 6.3666e-06,
-1.3359e-05, 3.8248e-07, 5.4745e-06, 2.8983e-06, 5.4382e-06,
4.1145e-06, 2.4674e-06, 2.2288e-05, -1.3930e-07, 5.4979e-06,
-6.9288e-06, -3.5444e-06]], grad_fn=<NativeGroupNormBackward>)

### Versions

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

cc @albanD @mruberry @jbschlosser @walterddr @saketh-are