11

While running the command make pycaffe, I encountered the error below:

NVCC src/caffe/solvers/adadelta_solver.cu nvcc fatal   : Unsupported
gpu architecture 'compute_20' Makefile:594: recipe for target
'.build_release/cuda/src/caffe/solvers/adadelta_solver.o' failed make:
*** [.build_release/cuda/src/caffe/solvers/adadelta_solver.o] Error 1

System Information
------------------

OS: ubuntu: 16.10

CUDA 8.0

cuDNN: 6.0 

CUDA_ARCH: CUDA_ARCH := 

         -gencode arch=compute_20,code=sm_20 \
        -gencode arch=compute_20,code=sm_21 \
        -gencode arch=compute_30,code=sm_30 \
        -gencode arch=compute_35,code=sm_35 \
        -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_52,code=sm_52 \
        -gencode arch=compute_60,code=sm_60 \
        -gencode arch=compute_61,code=sm_61 \
        -gencode arch=compute_61,code=compute_61

Can anyone help me?

1
  • small change cuDNN version is 8.0
    – Asha Datla
    Sep 29, 2017 at 6:27

3 Answers 3

19

As for me, I had to comment out the -gencode arch=compute_20 in Makefile.config:

CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
    -gencode arch=compute_35,code=sm_35 \
    -gencode arch=compute_50,code=sm_50

I stopped at 50 because CUDA's deviceQuery showed me Capability Major/Minor version number:

/usr/local/cuda/samples/bin/x86_64/linux/release/deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
  CUDA Driver Version / Runtime Version          9.0 / 9.0
  CUDA Capability Major/Minor version number:    5.0
  Total amount of global memory:                 4044 MBytes (4240965632 bytes)
  ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores
  GPU Max Clock rate:                            1176 MHz (1.18 GHz)
....

Then compilation and tests went well.

2

I had the same issue this morning. After installing CUDA and cuDNN, restart was required (as suggested here https://groups.google.com/forum/#!topic/caffe-users/WDOD3E04Avg), so that CMake properly detected set variables. So just make sure CUDA and cuDNN are properly installed and restart your system. If you still get the error, you might have a GPU that only supports compute capability 2.0, so I guess you could try CUDA 8.0 which supports it. You can check your GPU here: https://developer.nvidia.com/cuda-gpus

I can confirm that the tests were run successfully on my PC with CUDA 9.0 and cuDNN 7.0.2 enabled. After restart, the GPU architecture was automatically set to sm_50. I have a GTX 750 Ti, which according to documentation supports CUDA 5.0. So the configuration seems correct now! Here is the command for testing:

make runtest

If you get any errors while compiling the tests, you may try:

make runtest clean

This example also worked for me and it's more than 7x faster (60 seconds) than with OpenBLAS with 8 CPU cores (450 seconds)!

./examples/mnist/train_lenet.sh
1
  • Thanks a lot for your notice that CUDA Driver v8.0 supports compute capability 2.x. It will give a second life to life my old GPUs (9600 and 410M).
    – 18augst
    Aug 14, 2018 at 23:37
2

I also had this issue on my Jetson TX2, when installing NVcaffe (running make -j4).

The instructions in the nvidia jetson forum, here, say to replace:

-gencode arch=compute_61,code=sm_61

with

-gencode arch=compute_62,code=sm_62

in makefile.config. However, that line was not in my config file since, following the instructions, I pulled caffe-0.15, which doesn't contain that line. So in the end, what worked for me was replacing the following in my config file:

CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
        -gencode arch=compute_20,code=sm_21 \
        -gencode arch=compute_30,code=sm_30 \
        -gencode arch=compute_35,code=sm_35 \
        -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_50,code=compute_50

with

CUDA_ARCH := -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_52,code=sm_52 \
        -gencode arch=compute_60,code=sm_60 \
        -gencode arch=compute_62,code=sm_62 \
        -gencode arch=compute_61,code=compute_61

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .