Closed okdzhimiev closed 4 years ago
As a workaround - adding #include
Don't know how to fix this through cmake. Set -DCUDACC flag somehow?
Originally, the FindCUDA
script was offered as a standalone module for CMake. In later CMake versions, it should be included in CMake by default (that is: with the latest CMake versions, the FindCUDA
script should no longer be necessary).
But one issue now is that NVIDIA occasionally ... updates ... and ... changes... things (?). So there's a certain dilemma: One could wait until CMake was updated according to the changes from NVIDIA, and always require the latest CMake version - or continue using the FindCUDA
script, adjusting it where necessary.
I'd have to examine what's up with the __CUDACC__
macro, and how this could otherwise be resolved. But in doubt, I'd consider using what you called a "workaround" - or do you foresee any issues with that?
I don't see any potential problems though I haven't look much into this. In one other C++ CMake project I just have driver_types.h pulled by cublas_v2.h. Same as in jcublas/JCublas2JNI/src/JCublas2_common.hpp
I'll check whether
... adding #include
(before cuda_runtime) to JCudnnJNI/src/JCudnn_common.hpp
causes any issues on Windows. (Maybe for the next release, because it's not what I'd consider "critical" for now).
Until then, I'd leave this issue open, to make it less likely for it to buried under other tasks...
Let's see whether this issue comes up again. Closing for now.
nvcc doesn't define CUDACC for some reason when generating dependency files. This
can cause incorrect dependencies when #including files based on this macro which is
defined in the generating passes of nvcc invokation. We will go ahead and manually
define this for now until a future version fixes this bug.
set(CUDACC_DEFINE -DCUDACC)