CUDA编译问题-Dual BLN

CUDA编译问题-Dual BLN

问题:

Fix “identifier “__builtin_is_constant_evaluated” is undefined” error on Arch Linux
The Arch Linux has shipped gcc 9, but the newest CUDA V10.1.168 still only supports gcc 8. So I met following error after upgrading Arch Linux:

/usr/include/c++/9.1.0/bits/stl_function.h(437): error: identifier 
"__builtin_is_constant_evaluated" is undefined

解决

Unfortunately, gcc-8 package is not ready now. So I fell back to gcc-7:
SET(CMAKE_CUDA_FLAGS “${CMAKE_CUDA_FLAGS} -ccbin=gcc-7”}

Although the CUDA release note claims it already supports clang 8, I indeed bumped into some compile errors when using clang 8. So using gcc-7 is a feasible work-around for me.

  • GCC版本不一致
    目前使用gcc-9,需要调整到gcc-7
    gcc版本切换方式
    切换版本后编译成功

  • CUDA在conda中和本地不一致
    本地cuda 10.1,conda的cuda 11.6

你可能感兴趣的:(实验,图像增强,python,深度学习,开发语言)