🐛 Bug
python crashes (with SIGFPE) when dropout is called on an empty cuda tensor.
To Reproduce
Steps to reproduce the behavior:
import torch
torch.nn.functional.dropout(torch.Tensor([]).to('cuda'))
Floating point exception (core dumped)
Expected behavior
Either a python exception should be raised or it should be a no-op.
Environment
- PyTorch Version (e.g., 1.0): master
- OS (e.g., Linux): centos
- How you installed PyTorch (
conda, pip, source): source
- Build command you used (if compiling from source):
- Python version: 3.6
- CUDA/cuDNN version: cuda 9.2
- GPU models and configuration:
- Any other relevant information:
Additional context