Repository: pytorch
Issue: `torch.distributions.Categorical` crashes with illegal instruction
Labels: module: crash,module: distributions,triaged

## 🐛 Bug

I created a fresh environment with python 3.7 and pytorch 1.6 to use the newest release of Kornia. However, I find that my old code is broken and I could trace it down to `torch.distributions.Categorical` using illegal instructions. Note that it appears very environment-specific (see Environment section)

## To Reproduce
The following code crashes:

```python
import torch                                                                                                                                                                      
import torch.distributions as D                                                                                                                                                   
d = D.Categorical(logits=torch.randn(20, 20, 2))                                                                                                                                  
>> Illegal instruction
```

## Environment
### Bug happens:

PyTorch version: 1.6.0
Is debug build: No
CUDA used to build PyTorch: Could not collect

OS: Ubuntu 18.04 LTS
GCC version: (Ubuntu 7.3.0-16ubuntu3) 7.3.0
CMake version: version 3.10.2

Python version: 3.7
Is CUDA available: No
CUDA runtime version: 9.0.176
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] torch==1.6.0
[pip3] torch-dimcheck==0.0.1
[pip3] torch-localize==0.1.0
[pip3] torchvision==0.7.0
[conda] blas                      1.0                         mkl
[conda] cpuonly                   1.0                           0    pytorch
[conda] mkl                       2020.1                      217
[conda] mkl-service               2.3.0            py37he904b0f_0
[conda] mkl_fft                   1.1.0            py37h23d657b_0
[conda] mkl_random                1.1.1            py37h0573a6f_0
[conda] numpy                     1.19.1           py37hbc911f0_0
[conda] numpy-base                1.19.1           py37hfa32c7d_0
[conda] pytorch                   1.6.0               py3.7_cpu_0  [cpuonly]  pytorch
[conda] torchvision               0.7.0                  py37_cpu  [cpuonly]  pytorch

### Works fine:
PyTorch version: 1.6.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.18.1

Python version: 3.7 (64-bit runtime)
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:
[pip3] numpy==1.19.1
[pip3] torch==1.6.0
[pip3] torch-dimcheck==0.0.1
[pip3] torch-localize==0.1.0
[pip3] torchvision==0.7.0
[conda] blas                      1.0                         mkl  
[conda] cpuonly                   1.0                           0    pytorch
[conda] mkl                       2020.1                      217  
[conda] mkl-service               2.3.0            py37he904b0f_0  
[conda] mkl_fft                   1.1.0            py37h23d657b_0  
[conda] mkl_random                1.1.1            py37h0573a6f_0  
[conda] numpy                     1.19.1           py37hbc911f0_0  
[conda] numpy-base                1.19.1           py37hfa32c7d_0  
[conda] pytorch                   1.6.0               py3.7_cpu_0  [cpuonly]  pytorch
[conda] torchvision               0.7.0                  py37_cpu  [cpuonly]  pytorch


cc @vincentqb @fritzo @neerajprad @alicanb @vishwakftw