-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Description
🐛 Bug
As in the title: sanitization for the stride argument to convolutions doesn't check for 0 and crashes with core dump (note that negative strides are checked).
To Reproduce
input = torch.randn(1, 1, 32, 32)
c = nn.Conv2d(1, 32, 3, stride=0, bias=False, padding=(0, 1), padding_mode='constant')
c(input)Expected behavior
A Python exception, ideally at Conv2d instantiation; alternatively at call site.
Environment
PyTorch version: 1.2.0
Is debug build: No
CUDA used to build PyTorch: None
OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2
Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Versions of relevant libraries:
[pip] Could not collect
[conda] cpuonly 1.0 0 pytorch
[conda] pytorch 1.2.0 py3.7_cpu_0 [cpuonly] pytorch
[conda] torchvision 0.4.0 py37_cpu [cpuonly] pytorch