I’m quite certain that I’m about to describe is a familiar problem and I’m looking for guidance in order to choose the more/most appropriate solution.
I’ve got a large C++ code base that’s currently compiled with GGC 6 (hoping to move to GCC 7 soon) and now I am planning to implement some new modules in CUDA for hardware acceleration on NVIDIA GPUs. The problem that the CUDA 8.0 compiler nvcc requires GCC 5.
I’d like to compile my (existing) non-CUDA code with GCC 6/7 but compile the CUDA code with NVCC and GCC 5. Specifically, I’m considering creating a C-wrapper for the CUDA parts of the code. What I’m concerned about is possible linkage issues due to ABI differences in the GCC 5 and 6.
I’d appreciate advise on how to introduce CUDA modules that require GCC 5 while to compile my existing C++ code base with GCC 6.
BTW, I’d like to use CUDA C++ instead of CUDA C because I plan to make heavy use of use thrust.