Moving from python3.6.9 to python3.7.5 doesn’t help.
With torch==1.6.0 and python3.7.5:
steph@steph-desktop:~$ python3.7
Python 3.7.5 (default, Nov  7 2019, 10:50:52)
[GCC 8.3.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)



While with torch==1.5.0 and python3.7.5:
steph@steph-desktop:~$ python3.7
Python 3.7.5 (default, Nov  7 2019, 10:50:52)
[GCC 8.3.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.0653,  1.4195,  2.4267, -0.1173,  1.0128]]),
indices=tensor([[1, 0, 1, 0, 1]]))




quit()
steph@steph-desktop:~$



LIBRARIES, KERNEL AND PROCESSOR:
Libraries:
(No “fancy” installs for these libraries)
libc6: version 2.27-3ubuntu1.2
libopenmp: version 2.1.1-8
liblas3: version 3.7.1-4ubuntu1
Kernel:
steph@steph-desktop:~$ uname -a
Linux steph-desktop 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
For the cpu:
Indeed, the problem might well be my (a bit old) processor which doesn’t support the SSE4 instruction set but only SSE2.
Does the processor have to support the SSE4 instruction set for torch.max() function to work properly?
I know that I can’t install tensorflow because of incompatibility of my cpu with SSE4.
steph@steph-desktop:~$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              6
On-line CPU(s) list: 0-5
Thread(s) per core:  1
Core(s) per socket:  6
Socket(s):           1
NUMA node(s):        1
Vendor ID:           AuthenticAMD
CPU family:          16
Model:               10
Model name:          AMD Phenom™ II X6 1065T Processor
Stepping:            0
CPU MHz:             1560.909
CPU max MHz:         2900.0000
CPU min MHz:         800.0000
BogoMIPS:            5827.05
Virtualization:      AMD-V
L1d cache:           64K
L1i cache:           64K
L2 cache:            512K
L3 cache:            6144K
NUMA node0 CPU(s):   0-5
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb hw_pstate vmmcall npt lbrv svm_lock nrip_save pausefilter