Repository: pytorch
Issue: Differences in the results of conv2d calculations in PyTorch 1.8
Labels: needs reproduction,module: cudnn,triaged

### 🐛 Describe the bug

```python
import torch
inputs = torch.tensor([[[[1., 2.],
          [3., 4.]],
         [[5., 6.],
          [7., 8.]]]], device='cuda:0', dtype=torch.float16)
weight = torch.tensor([[[[1.]],
         [[2.]]]], device='cuda:0', dtype=torch.float16)

with torch.backends.cudnn.flags(deterministic=True, benchmark=True):
    stride = (2, 2)
    padding = (0, 0)
    dilation = (1, 1)
    groups = 1
    out_gpu = torch.nn.functional.conv2d(
        inputs,
        weight,
        None,
        stride=stride,
        padding=padding,
        dilation=dilation,
        groups=groups,
    )
    out_cpu = torch.nn.functional.conv2d(
        inputs.to('cpu').to(torch.float),
        weight.to('cpu').to(torch.float),
        None,
        stride=stride,
        padding=padding,
        dilation=dilation,
        groups=groups,
    )
print(f"{out_cpu = }")
print(f"{out_gpu = }")
```
## Output
```
out_cpu = tensor([[[[11.]]]])
out_gpu = tensor([[[[5.]]]], device='cuda:0', dtype=torch.float16)
```
The expected result is 11.
Also, the result at cpu or other version is 11 as expected.
However, the result at PyTorch 1.6, 1.7 at cuda with torch.float16, torch.float32, torch.float64 is 5

### Versions
I am using [nvcr.io/nvidia/pytorch:20.12-py3](http://nvcr.io/nvidia/pytorch:20.12-py3) on 3070Ti at ArchLinx(linux: 6.4.4-arch1-1)
```
Collecting environment information...
PyTorch version: 1.8.0a0+1606899
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.1 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: version 3.18.2
Libc version: glibc-2.31
Python version: 3.8.5 (default, Sep  4 2020, 07:30:14)  [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-6.4.4-arch1-1-x86_64-with-glibc2.10
Is CUDA available: True
CUDA runtime version: 11.1.105
CUDA_MODULE_LOADING set to:
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070 Ti
Nvidia driver version: 535.86.05
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          16
On-line CPU(s) list:             0-15
Thread(s) per core:              2
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           167
Model name:                      11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
Stepping:                        1
CPU MHz:                         2127.380
CPU max MHz:                     4900.0000
CPU min MHz:                     800.0000
BogoMIPS:                        4993.00
Virtualization:                  VT-x
L1d cache:                       384 KiB
L1i cache:                       256 KiB
L2 cache:                        4 MiB
L3 cache:                        16 MiB
NUMA node0 CPU(s):               0-15
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
Vulnerability Retbleed:          Mitigation; Enhanced IBRS
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md_clear flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] flake8==3.7.9
[pip3] numpy==1.19.2
[pip3] pytorch-transformers==1.1.0
[pip3] torch==1.8.0a0+1606899
[pip3] torchtext==0.9.0a0
[pip3] torchvision==0.9.0a0
[conda] magma-cuda110             2.5.2                         5    local
[conda] mkl                       2019.4                      243
[conda] mkl-include               2019.4                      243
[conda] nomkl                     3.0                           0
[conda] numpy                     1.19.2           py38h6163131_0
[conda] numpy-base                1.19.2           py38h75fe3a5_0
[conda] pytorch-transformers      1.1.0                    pypi_0    pypi
[conda] torch                     1.8.0a0+1606899          pypi_0    pypi
[conda] torchtext                 0.9.0a0                  pypi_0    pypi
[conda] torchvision               0.9.0a0                  pypi_0    pypi 
```

## Possible related issues
- https://github.com/pytorch/pytorch/issues/55381
- https://github.com/pytorch/pytorch/issues/54036
If there is any duplication with these issues, please let me know. 


Thank you in advance.

cc @csarofeen @ptrblck @xwang233