Openpose: nvcc fatal : Unsupported gpu architecture 'compute_71' CMake Error at openpose_generated_renderHand.cu.o.Release.cmake:219

Created on 14 Feb 2019  路  10Comments  路  Source: CMU-Perceptual-Computing-Lab/openpose

Hello All,

I followed installation instructions and Generated successfully and executed below make command inside build folder. But getting the following at last stage. (Ubuntu18.04 mahine/laptop, with CUDA9 and cuDNN v7.2 )

Please guide me to resolve this issue, I am struggling here since long.

cd build/
make -jnproc

/build/caffe/bin/classification" to "/home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial:/usr/local/cuda-9.0/lib64"
-- Installing: /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/bin/convert_mnist_data
-- Set runtime path of "/home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/bin/convert_mnist_data" to "/home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial:/usr/local/cuda-9.0/lib64"
-- Installing: /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/bin/convert_mnist_siamese_data
-- Set runtime path of "/home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/bin/convert_mnist_siamese_data" to "/home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/caffe/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial:/usr/local/cuda-9.0/lib64"
[100%] Completed 'openpose_lib'
Rerunning cmake after building Caffe submodule
-- GCC detected, adding compile flags
-- Building with CUDA.
-- CUDA detected: 9.0
-- Found cuDNN: ver. 7.2.1 found (include: /usr/local/cuda-9.0/include, library: /usr/local/cuda-9.0/lib64/libcudnn.so)
-- Automatic GPU detection failed. Building for all known architectures.
-- Added CUDA NVCC flags for: sm_30 sm_35 sm_37 sm_50 sm_52 sm_53 sm_60 sm_61 sm_62 sm_70 sm_71 sm_72 sm_75
-- Found cuDNN: ver. 7.2.1 found (include: /usr/local/cuda-9.0/include, library: /usr/local/cuda-9.0/lib64/libcudnn.so)
-- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Caffe will be downloaded from source now. NOTE: This process might take several minutes depending
        on your internet connection.
-- Caffe has already been downloaded.
HEAD is now at b5ede488 Added TX2 JetPack3.3 support
-- Caffe will be built from source now.
-- Adding Example calibration.bin
-- Adding Example openpose.bin
-- Adding Example 1_custom_post_processing.bin
-- Adding Example 01_body_from_image_default.bin
-- Adding Example 02_whole_body_from_image_default.bin
-- Adding Example 03_keypoints_from_image.bin
-- Adding Example 04_keypoints_from_images.bin
-- Adding Example 05_keypoints_from_images_multi_gpu.bin
-- Adding Example 06_face_from_image.bin
-- Adding Example 07_hand_from_image.bin
-- Adding Example 08_heatmaps_from_image.bin
-- Adding Example 09_keypoints_from_heatmaps.bin
-- Adding Example 10_asynchronous_custom_input.bin
-- Adding Example 11_asynchronous_custom_output.bin
-- Adding Example 12_asynchronous_custom_input_output_and_datum.bin
-- Adding Example 13_synchronous_custom_input.bin
-- Adding Example 14_synchronous_custom_preprocessing.bin
-- Adding Example 15_synchronous_custom_postprocessing.bin
-- Adding Example 16_synchronous_custom_output.bin
-- Adding Example 17_synchronous_custom_all_and_datum.bin
-- Adding Example 1_thread_user_processing_function.bin
-- Adding Example 2_thread_user_input_processing_output_and_datum.bin
-- Adding Example handFromJsonTest.bin
-- Adding Example resizeTest.bin
-- Download the models.
-- Downloading BODY_25 model...
-- Model already exists.
-- Not downloading body (COCO) model
-- Not downloading body (MPI) model
-- Downloading face model...
-- Model already exists.
-- Downloading hand model...
-- Model already exists.
-- Models Downloaded.
Submodule '3rdparty/pybind11' (https://github.com/pybind/pybind11.git) registered for path '../3rdparty/pybind11'
Cloning into '/home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/3rdparty/pybind11'...
Submodule path '../3rdparty/pybind11': checked out '085a29436a8c472caaaf7157aa644b571079bcaa'
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.7") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build
[  0%] Building NVCC (Device) object src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o
[  0%] Building NVCC (Device) object src/openpose/CMakeFiles/openpose.dir/hand/openpose_generated_renderHand.cu.o
[  1%] Building NVCC (Device) object src/openpose/CMakeFiles/openpose.dir/face/openpose_generated_renderFace.cu.o
[  3%] Built target openpose_lib
[  3%] Building NVCC (Device) object src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_bodyPartConnectorBase.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_71'
CMake Error at openpose_generated_renderHand.cu.o.Release.cmake:219 (message):
  Error generating
  /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/src/openpose/CMakeFiles/openpose.dir/hand/./openpose_generated_renderHand.cu.o


nvcc fatal   : Unsupported gpu architecture 'compute_71'
src/openpose/CMakeFiles/openpose.dir/build.make:70: recipe for target 'src/openpose/CMakeFiles/openpose.dir/hand/openpose_generated_renderHand.cu.o' failed
CMake Error at openpose_generated_pyramidalLK.cu.o.Release.cmake:219 (message):
  Error generating
  /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/src/openpose/CMakeFiles/openpose.dir/tracking/./openpose_generated_pyramidalLK.cu.o


make[5]: *** [src/openpose/CMakeFiles/openpose.dir/hand/openpose_generated_renderHand.cu.o] Error 1
make[5]: *** Waiting for unfinished jobs....
nvcc fatal   : Unsupported gpu architecture 'compute_71'
CMake Error at openpose_generated_renderFace.cu.o.Release.cmake:219 (message):
  Error generating
  /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/src/openpose/CMakeFiles/openpose.dir/face/./openpose_generated_renderFace.cu.o


src/openpose/CMakeFiles/openpose.dir/build.make:112: recipe for target 'src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o' failed
make[5]: *** [src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o] Error 1
src/openpose/CMakeFiles/openpose.dir/build.make:63: recipe for target 'src/openpose/CMakeFiles/openpose.dir/face/openpose_generated_renderFace.cu.o' failed
make[5]: *** [src/openpose/CMakeFiles/openpose.dir/face/openpose_generated_renderFace.cu.o] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_71'
CMake Error at openpose_generated_bodyPartConnectorBase.cu.o.Release.cmake:219 (message):
  Error generating
  /home/vasanthahr/code/python/modaka/handLandMark_openPose/handML_openpose/openpose/build/src/openpose/CMakeFiles/openpose.dir/net/./openpose_generated_bodyPartConnectorBase.cu.o


src/openpose/CMakeFiles/openpose.dir/build.make:77: recipe for target 'src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_bodyPartConnectorBase.cu.o' failed
make[5]: *** [src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_bodyPartConnectorBase.cu.o] Error 1
CMakeFiles/Makefile2:219: recipe for target 'src/openpose/CMakeFiles/openpose.dir/all' failed
make[4]: *** [src/openpose/CMakeFiles/openpose.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/openpose_lib.dir/build.make:124: recipe for target 'openpose_lib' failed
make[2]: *** [openpose_lib] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/openpose_lib.dir/all' failed
make[1]: *** [CMakeFiles/openpose_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

butypo fixeadded in newer versions

All 10 comments

Please follow the issue guidelines

I have a similar issue

[  3%] Built target openpose_lib
[  3%] Building NVCC (Device) object src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_71'
CMake Error at openpose_generated_pyramidalLK.cu.o.Release.cmake:219 (message):
  Error generating
  /home/ls/openpose/build/src/openpose/CMakeFiles/openpose.dir/tracking/./openpose_generated_pyramidalLK.cu.o


src/openpose/CMakeFiles/openpose.dir/build.make:112: recipe for target 'src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o' failed
make[2]: *** [src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o] Error 1
CMakeFiles/Makefile2:219: recipe for target 'src/openpose/CMakeFiles/openpose.dir/all' failed
make[1]: *** [src/openpose/CMakeFiles/openpose.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

I tried to edit Makefile to get rid of compute_71 (and above) but it didn't help.

_Ubuntu18.04
CUDA10.0
cuDNN v7.4.2_

What GPU are you all using.

What GPU are you all using.

GTX 1070 Mobile

Its likely you dont have the right version of cuda set/installed:

Can you try

ls -alh /usr/local | grep cuda

And tell me what you get

lrwxrwxrwx 1 root root 9 褎械胁 16 23:32 cuda -> cuda-10.0

I can try to find and install cuda 9 instead of 10, but as I have Ubuntu 18, I'm not sure if it's going to work with it.

Hi, it has been fixed in the latest version. Please, try that one. Best

I encountered the same issue and updating the nvidia-drivers and reinstalling cuda - cudnn resolved the problem.

If your cuda does not support your gpu, change your cuda version.
Otherwise, if your device is not compute_71 (e.g. it is a GTX 10XX series).
You can remove the nvcc compute_71 flags in the cmake files with the following command.
This worked for me:
First configure the cmake but before generating the makefile run:
(change accordingly for compute_71, this is for compute_75)
To remove the flag from .cmake files:

find . -name "**.cmake" -exec sed -i "s/-gencode;arch=compute_75,code=sm_75;//g" {} \;

To remove the flag from .pre-gen files (I don't know if this is necessary):

find . -name "**.pre-gen" -exec sed -i "s/-gencode;arch=compute_75,code=sm_75;//g" {} \;

Finally run the following command to see if any flag is remaining,

grep -r "compute_75"

Manually remove those flags (for me there were one example file which was not .cmake and .pre-gen)
After this generate the makefile using cmake-gui and build openpose.

I had the same problem, and then it was caused by a mismatch between cuda and the libcublas version.
My cuda is 10.0, but apt installs 9.1 (queried by the command: ldconfig-p | grep cublas).
Then I downloaded the appropriate version in (https://ubuntu.pkgs.org/19.04/ubuntu-multiverse-amd64/libcublas10_10.1.105-0ubuntu1_amd64.deb.html) and executed
dpkg -i libcublas10_10.1.105-0ubuntu1_amd64.deb

Was this page helpful?
0 / 5 - 0 ratings