nvcc fatal : Unsupported gpu architecture 'compute_86'
Asked Answered
A

4

8

I have a Nvidia RTX 3090 ti 24GB with this drivers

CUDA Version: 11.4 

Driver Version: 470.74

18.04.1-Ubuntu SMP

Cuda compilation tools, release 9.1, V9.1.85

I've looked for this card architecture and it is Ampere so the version of library are compute_86 or sm_86(if I am not wrong). But while compiling with nvcc it gives me back

nvcc fatal : Unsupported gpu architecture 'compute_86'

I've runned nvcc --help and I've found something strange, it returned me that for gpu-code and gpu-architecture

Allowed values for this option: 'compute_30','compute_32','compute_35', 'compute_37','compute_50','compute_52','compute_53','compute_60','compute_61', 'compute_62','compute_70','compute_72','sm_30','sm_32','sm_35','sm_37','sm_50', 'sm_52','sm_53','sm_60','sm_61','sm_62','sm_70','sm_72'.

So I'm missing any driver version or some library that has to be donwloaded or I can't compile with my GPU?

Accelerometer answered 6/11, 2021 at 16:25 Comment(5)
Your nvcc seems to be V9.1. Maybe update it to V11.4? Try nvcc -V to know for sure. Have you installed the cuda toolkit (including nvcc) and the nvidia driver separately?Province
I was looking for the newest version and it seems to be 9.1.85 as I wrote in the question, so I don't understand how is that possible, if I use apt search it returns that nvidia-cuda-toolkit/bionic,now 9.1.85-3ubuntu1 amd64 [installed] NVIDIA CUDA development toolkit on another pc I have that nvidia-cuda-toolkit/focal 10.1.243-3 amd64 NVIDIA CUDA development toolkit nvidia-cuda-toolkit-gcc/focal 10.1.243-3 amd64 NVIDIA CUDA development toolkit (GCC compatibility) How can i force to update to newer version? Is it possible with Ubuntu 18.04? ThanksAccelerometer
To me, updating nvidia packages from apt is always problematic. It is better to follow the instructions from this webpage: developer.nvidia.com/cuda-11-4-2-download-archive. There is an 18.04 version for the cuda toolkit. Also, you might have had the cuda environmental variables set to the path of the old version of nvcc, remember to change them after installing the new one.Province
Thanks a lot I'm trying to update with your link If it works I will clone the questionAccelerometer
It worked, please can you post it as solution?Accelerometer
P
4

In your posted system information, the last line

Cuda compilation tools, release 9.1, V9.1.85

indicates that your NVCC is currently V9.1 (use nvcc -V to know for sure). NVCC of this version is too old to support compute_86. A possible reason for which this happens is that you have installed the CUDA toolkit (including NVCC) and the GPU drivers separately, with different CUDA versions. You can solve it by updating it to V11.4 by following the instructions on this official page: developer.nvidia.com/cuda-11-4-2-download-archive. In my experience, managing NVIDIA drivers and CUDA toolkits with apt often messes up the system. So it is recommended to use the official installer instead. Remember to reset the CUDA-related environment variables to link to the new version if you have set them before.

To get another specific version of CUDA, you can just google "cuda toolkit (version number) download" and look for the official nvidia website results.

Province answered 8/11, 2021 at 12:45 Comment(3)
I'm also facing the same problem, I did download the cuda from nvidia site but my nvcc version never changed. Is there anything else to be changed or linked to correct version anywhere?Surrebuttal
@Surrebuttal These three environment variables need to be reset (in ~/.bashrc): export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.4/lib64, export PATH=$PATH:/usr/local/cuda-11.4/bin, export CUDA_HOME=/usr/local/cuda-11.4Province
yes you are right. My problem was solved by adding PATH in .bashrc. I figured that out by going through millions of lines of boring instructions provided on nvidia's official site. I wish someone has highlighted it in bold somewhere, it would have saved my days of time in figuring this out.Surrebuttal
E
1

You nvcc version is too old to support compute_86.

Since you installed cuda 11.4, you can add the cuda 11.4 bin fold to path so that you can use nvcc 11.4 to compile.

export PATH=/usr/local/cuda-11.4/bin:$PATH

then compile.

or

echo "export PATH=/usr/local/cuda-11.4/bin:$PATH" >> ~/.bashrc
source ~/.bashrc

if you are using zsh

echo "export PATH=/usr/local/cuda-11.4/bin:$PATH" >> ~/.zshrc
source ~/.zshrc
Enlistment answered 5/5, 2023 at 4:58 Comment(1)
The only one solution that helped meMannose
U
0

this is how to easy install openpose

copy the following script and save it in new text file and save as bash file. example: rename text file as install.sh

also change the desired instal location in the second line

export SOFTWARE_INSTALL_DIR=/usr/local/soft

#!/bin/bash

export SOFTWARE_INSTALL_DIR=/usr/local/soft

# Prerequisites Installation
sudo apt update
sudo apt full-upgrade -y
sudo apt autoremove -y
sudo apt install gcc g++ make autoconf git libtool curl unzip python3-pip cmake-qt-gui caffe-cpu libopencv-dev python-dev libgoogle-glog-dev libboost-all-dev libhdf5-dev libatlas-base-dev -y
sudo apt clean
pip3 install -U pip numpy opencv-python

# Directory Configuration
sudo mkdir -p $SOFTWARE_INSTALL_DIR
cd $SOFTWARE_INSTALL_DIR
sudo chown -R $USERNAME:$USERNAME $SOFTWARE_INSTALL_DIR

# Protocol Buffers Installation
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig

# OpenPose Installation
cd $SOFTWARE_INSTALL_DIR
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
cd openpose
git submodule update --init --recursive --remote
sudo mkdir build/
cd build/
sudo cmake-gui ..
make -j`nproc`

# Running Example
# cd $SOFTWARE_INSTALL_DIR/openpose
# ./build/examples/openpose/openpose.bin --video examples/media/video.avi

then run following command in terminal

sudo bash install.sh
Upholster answered 3/12, 2022 at 13:11 Comment(0)
Z
0

Using cuda 12 fixed it for me.

Zephyrus answered 13/2, 2023 at 2:53 Comment(2)
Great to know. I am also using CUDA 12 but having the error. Can you please share how you solved it?Moravian
I'm running CUDA 12.1 and adding the lines that @Province mentioned in the answer above into my bashrc did the trick. (after editing the code to use 12.1)Witt

© 2022 - 2024 — McMap. All rights reserved.