Repository: pytorch
Issue: Incorrent output with dtyper=float64 in `torch.nn.functional.conv1d` and  `torch.nn.functional.conv3d` operations 
Labels: needs reproduction,module: windows,module: nn,triaged

### 🐛 Describe the bug

Similar to [issue#141221](https://github.com/pytorch/pytorch/issues/141221)，
the same issue occurs with `torch.nn.functional.conv1d` and `torch.nn.functional.conv3d`.

Code:
```python
def test_conv_api(conv_func, input_shape, weight_shape, dilation, dtype):
    x = torch.ones(input_shape, dtype=dtype)
    w = torch.ones(weight_shape, dtype=dtype)

    out = conv_func(x, w, dilation=dilation)
    print(out.max())  # Output the max value, similar to the original test case

# Test conv1d
print("Testing conv1d:")
test_conv_api(torch.nn.functional.conv1d, (2, 1, 16), (4, 1, 3), dilation=2, dtype=torch.float32)
test_conv_api(torch.nn.functional.conv1d, (2, 1, 16), (4, 1, 3), dilation=2, dtype=torch.float64)

# Test conv3d
print("Testing conv3d:")
test_conv_api(torch.nn.functional.conv3d, (2, 1, 8, 8, 8), (4, 1, 3, 3, 3), dilation=2, dtype=torch.float32)
test_conv_api(torch.nn.functional.conv3d, (2, 1, 8, 8, 8), (4, 1, 3, 3, 3), dilation=2, dtype=torch.float64)
```
The output:
```
Testing conv1d:
tensor(3.)
tensor(9., dtype=torch.float64)
Testing conv3d:
tensor(27.)
tensor(729., dtype=torch.float64)
```

### Versions

```
PyTorch version: 2.4.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 (10.0.19045 64 位)
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.8.8rc1 (tags/v3.8.8rc1:dfd7d68, Feb 17 2021, 11:01:21) [MSC v.1928 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19041-SP0
Is CUDA available: True
CUDA runtime version: 12.1.66
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070
Nvidia driver version: 560.94
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Name: AMD Ryzen 7 5700X 8-Core Processor
Manufacturer: AuthenticAMD
Family: 107
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 3401
MaxClockSpeed: 3401
L2CacheSize: 4096
L2CacheSpeed: None
Revision: 8450

Versions of relevant libraries:
[pip3] numpy==1.24.3
[pip3] torch==2.4.1+cu121
[pip3] torchaudio==2.4.1+cu121
[pip3] torchvision==0.19.1+cu121
[conda] _anaconda_depends         2023.09             py311_mkl_1
[conda] blas                      1.0                         mkl
[conda] mkl                       2023.1.0         h6b88ed4_46357
[conda] mkl-service               2.4.0           py311h2bbff1b_1
[conda] mkl_fft                   1.3.8           py311h2bbff1b_0
[conda] mkl_random                1.2.4           py311h59b6b97_0
[conda] numpy                     1.24.3          py311hdab7c0b_1
[conda] numpy-base                1.24.3          py311hd01c5d8_1
[conda] numpydoc                  1.5.0           py311haa95532_0
[conda] torch                     2.1.0                    pypi_0    pypi
```

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki