많은 페이지를 보았지만 불분명하고 지식이 충분하지 않아서 말하는 내용을 따르지 못했습니다. .nvcc fatal : 'gpu-architecture'옵션에 'sm_20'값이 정의되어 있지 않습니다.
나는 실행하려고 :
luarocks install https://raw.githubusercontent.com/qassemoquab/stnbhwd/master/stnbhwd-scm-1.rockspec
을 그래서 GPU 가속을 사용하여 일부 이미지를 통해 DenseCap를 실행할 수있다. 내가 그것을 실행하면이 오류를 얻을 :
$ luarocks install https://raw.githubusercontent.com/qassemoquab/stnbhwd/master/stnbhwd-scm-1.rockspec
Using https://raw.githubusercontent.com/qassemoquab/stnbhwd/master/stnbhwd-scm-1.rockspec... switching to 'build' mode
Cloning into 'stnbhwd'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 24 (delta 0), reused 14 (delta 0), pack-reused 0
Receiving objects: 100% (24/24), 19.42 KiB | 0 bytes/s, done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/tex/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1" && make
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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/tex/torch/install
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Compiling with OpenMP support
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "9.0", minimum required is "5.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_stnbhwd-scm-1-4197/stnbhwd/build
Scanning dependencies of target stn
[ 25%] Building C object CMakeFiles/stn.dir/init.c.o
[ 50%] Linking C shared module libstn.so
[ 50%] Built target stn
[ 75%] Building NVCC (Device) object CMakeFiles/custn.dir/custn_generated_init.cu.o
nvcc fatal : Value 'sm_20' is not defined for option 'gpu-architecture'
CMake Error at custn_generated_init.cu.o.cmake:207 (message):
Error generating
/tmp/luarocks_stnbhwd-scm-1-4197/stnbhwd/build/CMakeFiles/custn.dir//./custn_generated_init.cu.o
CMakeFiles/custn.dir/build.make:63: recipe for target 'CMakeFiles/custn.dir/custn_generated_init.cu.o' failed
make[2]: *** [CMakeFiles/custn.dir/custn_generated_init.cu.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/custn.dir/all' failed
make[1]: *** [CMakeFiles/custn.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Error: Build error: Failed building.
내가 luarocks install cutorch
, luarocks install cunn
및 luarocks install cudnn
잘 할 수 있었다.
저는 GTX 1080ti에서 우분투 16.04를 사용하고 있습니다. 내가 $ nvcc -V
을 실행할 때 몇 가지 이유를 들어
$ nvidia-smi
Tue Dec 5 16:25:42 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:29:00.0 On | N/A |
| 0% 47C P8 16W/250W | 716MiB/11169MiB | 1% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1128 G /usr/lib/xorg/Xorg 479MiB |
| 0 1782 G compiz 234MiB |
+-----------------------------------------------------------------------------+
는, 내가 얻을 :
The program 'nvcc' is currently not installed. You can install it by typing:
sudo apt install nvidia-cuda-toolkit
이 .. 그리고 이것이 내가 직면하고 또 다른 큰 문제입니다. nvcc를 설치할 때 Cuda 7.5 용 툴킷을 설치하지만 Cuda 9.0이 있습니다. Cuda's website에서 오는 .deb 파일을 사용하여 설치했습니다.
$ sudo apt-get install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
cuda is already the newest version (9.0.176-1).
The following packages were automatically installed and are no longer required:
libcublas7.5 libcudart7.5 libcufft7.5 libcufftw7.5 libcuinj64-7.5
libcurand7.5 libcusolver7.5 libcusparse7.5 libnppc7.5 libnppi7.5 libnpps7.5
libnvblas7.5 libnvrtc7.5 libnvtoolsext1 libnvvm3 libthrust-dev libvdpau-dev
nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-opencl-dev
nvidia-profiler nvidia-visual-profiler opencl-headers
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 222 not upgraded.
솔직히 내가 NVCC를 설치해야 할 것으로 예상하지만, 내가 말했듯이, 그것은 잘못된 버전을 설치하고, 나는 내 인생에 맞는 버전을 설치하는 방법을 알아낼 수 없습니다, 그리고 임 정말 내가 왜이 오류가 발생하는지에 관해 혼란스러워합니다. 이미 cutorch, cudnn 및 cunn을 설치 했는데도 문제가 없습니다. 어떤 도움을 설치하려고하는 stnbhwd의 CMakeLists.txt에서 일부 상위 버전에 코드 아키텍처 (예 : sm_20를) 변경 ...
감사
이 잘못된 버전'nvcc'를 설치하지 않습니다. 설치 출력은 CUDA 9가 이미 설치되어 있고 CUDA 7.5의 오래된 정크가 자동 변경되도록 제안하고 있음을 나타냅니다. 리눅스 설치 안내서의 설치 지침을 정확히 따르지 않았기 때문에'nvcc'를 찾을 수 없습니다. 즉, CUDA 9를 설치 한 후'PATH' 환경 변수를 설정해야합니다. 그리고 주어진 대답에 따라 수행 할 작업이 설명되어 있습니다. CUDA 9에서 지원하지 않는 'sm_20'에 관한 것이고 어쨌든 GPU와 일치하지 않습니다. –