How to support k40m gpu


I use libtorch (compiled by myself) with several gpu without problems, but when I try to use it on a nvidia K40m i get this error 43134 Illegal instruction

How can I add support for this card when compiling ?
I’m using CUDA 10.1 and I compile libtorch with this command

MAX_JOBS=4 USE_CUDA=1 USE_CUDNN=1 CFLAGS="-Ofast" python ../tools/

Are you getting this error only if you execute CUDA code or also CPU operations?
Could you try to get a stack trace via:

$ gdb --args python
Reading symbols from python...done.
(gdb) run
(gdb) backtrace

and post it here?

Also, could you post the versions of PyTorch, CUDA, NVIDIA driver?