简体   繁体   English

nvcc致命的:安装CUDA 8.0时不支持的gpu架构“ compute_61”

[英]nvcc fatal : Unsupported gpu architecture 'compute_61' while CUDA 8.0 is installed

I have a problem while installing cutorch with luarocks. 安装带羽绒被的割草机时出现问题。 The error announces that gpu architecture 'compute_61' is not supported. 该错误表明不支持gpu架构'compute_61'。 After some search I figured out that the problem can be caused by old CUDA version. 经过一番搜索,我发现问题可能是由旧的CUDA版本引起的。 But it is not the case since I have CUDA 8.0 但事实并非如此,因为我拥有CUDA 8.0

sudo ~/torch/install/bin/luarocks install cutorch
Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode
Cloning into 'cutorch'...
remote: Counting objects: 220, done.
remote: Compressing objects: 100% (174/174), done.
remote: Total 220 (delta 60), reused 93 (delta 44), pack-reused 0
Receiving objects: 100% (220/220), 211.56 KiB | 0 bytes/s, done.
Resolving deltas: 100% (60/60), done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/anya/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/anya/torch/install/lib/luarocks/rocks/cutorch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN) install

-- The C compiler identification is GNU 5.4.1
-- The CXX compiler identification is GNU 5.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/anya/torch/install
-- Found CUDA: /usr (found suitable version "7.5", minimum required is "6.5") 
-- TH_LIBRARIES: TH
-- Found gcc >=5 and CUDA <= 7.5, adding workaround C++ flags
-- MAGMA not found. Compiling without MAGMA support
-- Autodetected CUDA architecture(s): 6.1
-- got cuda version 7.5
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -gencode;arch=compute_61,code=sm_61;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_cutorch-scm-1-201/cutorch/build
[  2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o
[  2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o
[  3%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o
[  5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o
[  5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
[  6%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o
[  7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o
[  9%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:98: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
nvcc fatal   : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o


nvcc fatal   : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:63: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
lib/THC/CMakeFiles/THC.dir/build.make:77: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_61'
nvcc fatal   : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCStorageCopy.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o


CMake Error at THC_generated_THCBlas.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:91: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_61'
lib/THC/CMakeFiles/THC.dir/build.make:70: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:546: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_61'
nvcc fatal   : Unsupported gpu architecture 'compute_61'
CMake Error at THC_generated_THCStorage.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o


CMake Error at THC_generated_THCTensorCopy.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-201/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o


lib/THC/CMakeFiles/THC.dir/build.make:84: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1
lib/THC/CMakeFiles/THC.dir/build.make:105: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1
CMakeFiles/Makefile2:172: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.

I have CUDA 8.0 version and GTX1070 gpu 我有CUDA 8.0版本和GTX1070 GPU

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44

and nvidia-367 driver 和nvidia-367驱动程序

nvidia-smi
Tue Jan 17 14:04:47 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.57                 Driver Version: 367.57                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    Off  | 0000:01:00.0     Off |                  N/A |
| N/A   51C    P5    11W /  N/A |    209MiB /  8113MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0       997    G   /usr/lib/xorg/Xorg                             164MiB |
|    0      1855    G   compiz                                          42MiB |
+-----------------------------------------------------------------------------+

what could be the problem? 可能是什么问题呢?

In cmake checks at the beginning of installing cutorch you have: 在安装割草机开始时的cmake检查中,您具有:

-- Found CUDA: /usr (found suitable version "7.5", minimum required is "6.5")

It looks like you have two CUDA versions installed -and 7.5 is picked by the installer. 看来您已经安装了两个CUDA版本-并且安装程序选择了7.5 Another option is that installer doesn't support 8.0 . 另一个选择是安装程序不支持8.0

Thanks to everybody who replied. 感谢所有答复。 Finally the problem was resolved by reinstalling Torch AND (what I guess might be the reason) updating cudnn (from version V4 to V5). 最后,通过重新安装Torch AND(我想可能是原因)更新了cudnn(从版本V4到版本V5)解决了该问题。

I had something similar ( compute 70 ). 我有类似的东西( compute 70 )。 I think it was because I upgraded my ubuntu distribution (16.04 --> 18.04) and cuda 8.0 is not supported for ubuntu 18.04. 我认为这是因为我升级了ubuntu发行版(16.04-> 18.04),而ubuntu 18.04不支持cuda 8.0。 I uninstalled cuda 8.0, installed cuda 10.1, and the problem seems to have gone away. 我卸载了cuda 8.0,安装了cuda 10.1,问题似乎已经消失了。

Caveat: I was trying to solve the problem a few different ways, and this was the last thing I tried before it worked. 警告:我试图以几种不同的方式解决该问题,这是我在解决该问题之前所做的最后一件事。 Technically it could have been one of the intermediate steps that solved the unsupported gpu architecture error, but I can't go back and check now. 从技术上讲,它可能是解决unsupported gpu architecture错误的中间步骤之一,但我现在无法返回并进行检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM