Error nvcc fatal: Unsupported gpu architecture 'compute_xx' reported when compiling ElasticFusion on Linux

Notice: The following uses compute_30 as an example, and the same applies to others

  • Reason: compute_30 has been deprecated in cuda11
    insert image description here

Another method is to delete the corresponding code in CMakeLists or makefile, but ①makefile will be overwritten in cmake, and directly modifying makefile is not elegant; ②ElastcFusion's CMakeLists does not manually specify compute_30 but reads the code. I searched for it myself, and the solution is as follows.

  • Solution: modify Core/src/CudaComputeTargetFlags.cmake, add the following content

    if(ARCH MATCHES "30")
    	continue()
    endif()
    

    insert image description here

参考内容:
nvcc fatal : Unsupported gpu architecture ‘compute_30‘
nvcc fatal : Unsupported gpu architecture ‘compute_‘

Guess you like

Origin blog.csdn.net/OTZ_2333/article/details/124692056