nvcc fatal : Unsupported gpu architecture 'compute_75'
zzl20 opened this issue · 4 comments
Hi, when run " ./thirdparty/makedeps.sh --threads 5", there some errors:
(CUDA 10.0 , CUDNN 7.5)
Scanning dependencies of target VisionCore
[ 4%] Building CXX object CMakeFiles/VisionCore.dir/sources/Image/BufferOpsCPU.cpp.o
[ 8%] Building CXX object CMakeFiles/VisionCore.dir/sources/Image/ConnectedComponents.cpp.o
[ 13%] Building CXX object CMakeFiles/VisionCore.dir/sources/Image/ColorMapCPU.cpp.o
[ 17%] Building CXX object CMakeFiles/VisionCore.dir/sources/Image/FiltersCPU.cpp.o
[ 21%] Building CXX object CMakeFiles/VisionCore.dir/sources/Image/PixelConvertCPU.cpp.o
[ 26%] Building CXX object CMakeFiles/VisionCore.dir/sources/IO/ImageIO.cpp.o
[ 30%] Building CXX object CMakeFiles/VisionCore.dir/sources/IO/ImageUtilsCPU.cpp.o
[ 34%] Building CXX object CMakeFiles/VisionCore.dir/sources/IO/PLYModel.cpp.o
[ 39%] Building CXX object CMakeFiles/VisionCore.dir/sources/IO/SaveBuffer.cpp.o
[ 43%] Building CXX object CMakeFiles/VisionCore.dir/sources/Math/ConvolutionCPU.cpp.o
[ 47%] Building CXX object CMakeFiles/VisionCore.dir/sources/VisionCore.cpp.o
[ 52%] Building CXX object CMakeFiles/VisionCore.dir/sources/WrapGL/WrapGLBuffer.cpp.o
[ 56%] Building CXX object CMakeFiles/VisionCore.dir/sources/WrapGL/WrapGLCommon.cpp.o
[ 60%] Building CXX object CMakeFiles/VisionCore.dir/sources/WrapGL/WrapGLFramebuffer.cpp.o
[ 65%] Building CXX object CMakeFiles/VisionCore.dir/sources/Math/Random.cpp.o
[ 69%] Building CUDA object CMakeFiles/VisionCore.dir/sources/Image/BufferOpsGPU.cpp.o
nvcc fatal : Unsupported gpu architecture 'compute_75'
CMakeFiles/VisionCore.dir/build.make:422: recipe for target 'CMakeFiles/VisionCore.dir/sources/Image/BufferOpsGPU.cpp.o' failed
make[2]: *** [CMakeFiles/VisionCore.dir/sources/Image/BufferOpsGPU.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/VisionCore.dir/all' failed
make[1]: *** [CMakeFiles/VisionCore.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
How to solve this problem ?
What I think happens is that when building VisionCore, the cmake script that tries to autodetect which Compute Capabilities to compile for (basically, supported GPUs) fails to find the right one and compiles for all the common ones, including compute_75
, which is not supported by your CUDA/graphics card? This should be printed out when running cmake
Here's the line in VisionCore that detects flags
https://github.com/jczarnowski/vision_core/blob/924c53339b1d99ebb3b1e358edfaa1a4e8d3703b/CMakeLists.txt#L135
You could set these flags directly to whatever your actual GPU architecture is. This is also done in DeepFactors cmake here:
https://github.com/jczarnowski/DeepFactors/blob/master/sources/cuda/CMakeLists.txt#L5
You could repeat this in the VisionCore CMakeLists.
Hi,as follows:
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_75;code=sm_75)
CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_NVCC_ARCH_FLAGS ${CUDA_NVCC_FLAGS})
#CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_NVCC_ARCH_FLAGS Auto)
but, there are some new errors,“set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_75;code=sm_75) ” is wrong?
CMake Error at /usr/share/cmake-3.10/Modules/FindCUDA/select_compute_arch.cmake:153 (message):
Unknown CUDA Architecture Name -gencode in CUDA_SELECT_NVCC_ARCH_FLAGS
Call Stack (most recent call first):
CMakeLists.txt:139 (CUDA_SELECT_NVCC_ARCH_FLAGS)
Check the manual for CUDA_SELECT_NVCC_ARCH_FLAGS here:
https://cmake.org/cmake/help/v3.7/module/FindCUDA.html
You're passing the parameters in a wrong way, they are supposed to be like: "7.5" and not compiler flags.
I thought the whole point was that you don't support 75 and need to select an older architecture that is appropriate for your GPU?