Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvcc fatal : Unsupported gpu architecture 'compute_20' #25

Open
schornakj opened this issue Feb 23, 2020 · 4 comments
Open

nvcc fatal : Unsupported gpu architecture 'compute_20' #25

schornakj opened this issue Feb 23, 2020 · 4 comments

Comments

@schornakj
Copy link
Contributor

schornakj commented Feb 23, 2020

Originally posted by @yyxr75 in ros-industrial-attic/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.

@schornakj
Copy link
Contributor Author

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.

@yyxr75
Copy link

yyxr75 commented Feb 24, 2020

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

@schornakj
Copy link
Contributor Author

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.

@hshreeshail
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants