ros-industrial / yak

A library for integrating depth images into Truncated Signed Distance Fields.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvcc fatal : Unsupported gpu architecture 'compute_20'

schornakj opened this issue · comments

Originally posted by @yyxr75 in ros-industrial/yak_ros#19 (comment)

It looks like you're not building Yak, which is the underlying TSDF library that yak_ros uses. You will need to clone Yak into your workspace and install its dependencies before you can build yak_ros. It has a separate set of installation instructions, which can be found here.

Thank you a lot,
I tried to build and install 'yak' the project
I build it on CUDA 9.0 but error shows:

[ 5%] Building NVCC (Device) object CMakeFiles/yak.dir/src/cuda/yak_generated_tsdf_volume.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_20'
CMake Error at yak_generated_tsdf_volume.cu.o.cmake:220 (message):
Error generating
/home/yang/catkin_ws/src/yak/build/CMakeFiles/yak.dir/src/cuda/./yak_generated_tsdf_volume.cu

It seems I need to comment some config in some files
I was mostly told by the blog from webs that I should comment something in Makefile.config
but I can't find this file.

What kind of GPU are you using? It might be too old to run CUDA 9.0. Find your device on this list of CUDA-compatible GPUs and make sure it has compute capability 3.0 or greater.

The compute_20 (in other words, compute capability 2.0) GPU architecture is deprecated under CUDA 9.0 and later. This line in the Yak CMakeLists.txt automatically detects the correct architecture flags based on your system's GPU. See the CUDA_SELECT_ARCH_FLAGS function under FindCUDA in the CMake documentation for more information about how this works.

My Nvidia GPU is GTX710M, whose compute capability is 2.1.
Is there any way I can still use YAK repository on my computer?

You can try installing a version of CUDA compatible with compute capability 2.1, which I think would be CUDA 8.0. You would have to change this line in CMakeLists.txt from 9.0 to 8.0. There were several breaking API changes going from CUDA 8 to CUDA 9, so Yak may not successfully build under CUDA 8.0.

Backwards-compatibility is definitely a problem, and it'll continue to be a problem into the future as new CUDA versions are released. A long-term solution will be to modify the library to be abstracted from CUDA as described in #12, but that solution is still a long ways off.

What kind of GPU are you using? It might be too old to run CUDA 9.0. Find your device on this list of CUDA-compatible GPUs and make sure it has compute capability 3.0 or greater.

The compute_20 (in other words, compute capability 2.0) GPU architecture is deprecated under CUDA 9.0 and later. This line in the Yak CMakeLists.txt automatically detects the correct architecture flags based on your system's GPU. See the CUDA_SELECT_ARCH_FLAGS function under FindCUDA in the CMake documentation for more information about how this works.

Why does the cuda_select_nvcc_arch_flags function in the link mentioned above not have the Ampere architecture as one of the options? I am using an A6000 GPU which is of the Ampere architecture.
I am trying to install opencv-2.4.13.6 from source. When running make, I am getting the following error:

[  3%] Built target libjasper
[  3%] Built target opencv_core_pch_dephelp
[  4%] Built target pch_Generate_opencv_core
[  4%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/cuda_compile_generated_matrix_operations.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_20'
CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:208 (message):
  Error generating
  /home/shreessh/opencv-2.4.13.6/release/modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_generated_matrix_operations.cu.o


make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:65: modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/cuda_compile_generated_matrix_operations.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1639: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

I'm stuck on this and don't know how to debug this. @schornakj It would be really helpful if you could provide some pointers to resolve this. Thanks.