【发布时间】:2018-06-01 17:49:06
【问题描述】:
当较新 (CUDA 9) 版本的 nvcc 遇到 __CUDACC_VER__ 时,它会放弃并告诉您以下信息:
/usr/local/cuda/include/crt/common_functions.h:64:24: error: token ""__CUDACC_VER__ is no longer supported. Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported. Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."
那么,我如何将 __CUDACC_VER__ 的使用转换为适用于旧版本和新版本 NVCC 的东西?
【问题讨论】: