I’m using Linux, Ubuntu 18.04 with python3.6.9 and have a problem with the torch.max() function when using torch==1.6.0.
With torch==1.5.0. It works correctly:

steph@steph-desktop:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.



import torch
torch.version
‘1.5.0’




a=torch.randn(1,3,5)
a.max(1)
torch.return_types.max(
values=tensor([[ 1.4852,  1.0638, -0.7425, -0.4036,  0.8044]]),
indices=tensor([[1, 2, 0, 0, 2]]))




quit()




Then I pip3 uninstall torch==1.5.0 and pip3 install torch==1.6.0 --user
Then I do the same thing as above:

steph@steph-desktop:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.



import torch
torch.version
‘1.6.0’




a=torch.randn(1,3,5)
a.max(1)
Illegal instruction (core dumped)




Then I pip3 unstall torch==1.6.0 and pip3 install torch==1.5.0 --user again.

steph@steph-desktop:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.



import torch
torch.version
‘1.5.0’




a=torch.randn(1,3,5)
a.max(1)
torch.return_types.max(
values=tensor([[ 0.2041,  1.7543,  0.4384,  0.7029, -0.3107]]),
indices=tensor([[1, 1, 1, 0, 0]]))




quit()
steph@steph-desktop:~$




That is, we are back to normal.
Then I went on Google colab. Created a jupyter notebook. Imported torch. The imported version is torch==1.6.0. And there… it works.
So, is it a problem on my side or is it a problem with the torch==1.6.0 version for linux?