Nvcc fatal : Unsupported gpu architecture 'compute_86'

Hello,

I compile my program on a Ubuntu18.04 Linux PC with a RTX3090 GPU installed, and CUDA is 11.1, Driver Version: 455.23.04, but such an error happened:

nvcc fatal : Unsupported gpu architecture ‘compute_86’

My Makefile has the following setting:

ARCH= -gencode arch=compute_35,code=sm_35
-gencode arch=compute_50,code=[sm_50,compute_50]
-gencode arch=compute_52,code=[sm_52,compute_52]
-gencode arch=compute_61,code=[sm_61,compute_61]
-gencode arch=compute_70,code=[sm_70,compute_70]
-gencode arch=compute_72,code=[sm_72,compute_72]
-gencode arch=compute_75,code=[sm_75,compute_75]
-gencode arch=compute_86,code=[sm_86,compute_86]

How to resolve this issue ? thanks.
For the output of command ‘nvidia-smi’ and the error info, please see the attached images:


After installed the latest CUDA 11.1.1, then this error disappeared, thanks

I have the same problem but my version of CUDA is 11.2, so it shouldn’t appear : true or false ?

Since CUDA is 11.2, I guess your GPU doesn’t support architecture ‘compute_86’, this compute capability is supported by RTX30** series GPU

nvcc doesn’t care for the GPU in the system. If you are running with the nvcc from CUDA 11.2, you shouldn’t get an error message Unsupported gpu architecture ‘compute_86’ when compiling. I would suggest:

(1) Show the output of nvcc --version
(2) Show the complete nvcc invocation that gave rise to the error message.

I forgot to the the steps following the installation, about PATH and LD_LIBRARY_PATH, that sorted it out. It was using CUDA 10.1

1 Like

Same here. After do source ~/.bashrc the problem solved. Before that set the expert path thing in ~/.bashrc

Tengo el mismo error al intentar instalar OpenCV con CUDA en Python en Jetson Nano P3450 de 4gb

git clone GitHub - mdegans/nano_build_opencv: Build OpenCV on Nvidia Jetson Nano
cd nano_build_opencv
clear
cd nano_build_opencv
jtop
gedit build_opencv.sh
git diff
./build_opencv.sh 4.8.0
jetson-nano-jose@jetson-Jose:~/nano_build_opencv$ ./build_opencv.sh 4.8.0

[ 21%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o
nvcc fatal : Unsupported gpu architecture ‘compute_87’
CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.RELEASE.cmake:221 (message):
Error generating
/tmp/build_opencv/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o

modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target ‘modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o’ failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:2607: recipe for target ‘modules/core/CMakeFiles/opencv_core.dir/all’ failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2
Do you wish to remove temporary build files in /tmp/build_opencv ?
(Doing so may make running tests on the build later impossible)
Y/N