NVCC defines CUDACC_DEBUG when compiling device code in debug mode.
Let's do the same to help with compatibility between the two and possibly enable users to select debug-friendly code.
Implements PR45596.
Differential D78726
[CUDA] Define __CUDACC_DEBUG__ when compiling device code in debug mode tambre on Apr 23 2020, 9:24 AM. Authored by
Details
NVCC defines CUDACC_DEBUG when compiling device code in debug mode. Implements PR45596.
Diff Detail
Unit Tests Event Timeline
Comment Actions Abandoning as there are good reasons to not add this.
|
Built-in preprocessor macros are defined in clang/lib/Frontend/InitPreprocessor.cpp, so the change should ideally go there.
Also, it's not clear what exactly does the macro mean. I am not convinced that clang must set this macro. Clang is not 1:1 compatible with NVCC anyways, and I'd rather not add quirks unless they are absolutely necessary. In this case, it can be easily added by the user.