我在使用luarocks安装cutorch时遇到了问题。该错误宣布不支持gpu体系结构'compute_61'。经过一番搜索,我发现问题可能是由旧的CUDA版本引起的。但事实并非如此,因为我有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.
我有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
和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 |
+-----------------------------------------------------------------------------+
可能是什么问题?
答案 0 :(得分:1)
在安装cutorch开始时的cmake检查中,您有:
-- Found CUDA: /usr (found suitable version "7.5", minimum required is "6.5")
看起来你安装了两个CUDA版本 - 安装程序选择了7.5
。另一个选择是安装程序不支持8.0
。
答案 1 :(得分:1)
感谢所有回复的人。最后,通过重新安装Torch AND(我猜可能是原因)更新cudnn(从版本V4到V5)解决了问题。
答案 2 :(得分:0)
我有类似的事情(compute 70
)。我认为这是因为我升级了ubuntu发行版(16.04-> 18.04),而ubuntu 18.04不支持cuda 8.0。我卸载了cuda 8.0,安装了cuda 10.1,问题似乎已经消失了。
注意:我试图以几种不同的方式解决该问题,这是我在解决该问题之前所做的最后一件事。从技术上讲,它可能是解决unsupported gpu architecture
错误的中间步骤之一,但我现在无法返回并进行检查。