When compiling CUDA programs with flags --relocatable-device-code=true or --device-c (--device-c is the same as -dc or --relocatable-device-code=true --compile according to this CUDA documentation), chipStar doesn't recognize the flags and instead directly use them for compiling without converting them to the corresponding clang flags (-fgpu-rdc flag for --relocatable-device-code=true and -fgpu-rdc -c for --device-c (-dc)).
[Reproducer]
Have the following three files, main.cu, function.hpp, and function.cu:
When compiling CUDA programs with flags
--relocatable-device-code=true
or--device-c
(--device-c
is the same as-dc
or--relocatable-device-code=true --compile
according to this CUDA documentation), chipStar doesn't recognize the flags and instead directly use them for compiling without converting them to the corresponding clang flags (-fgpu-rdc
flag for--relocatable-device-code=true
and-fgpu-rdc -c
for--device-c
(-dc
)).[Reproducer] Have the following three files, main.cu, function.hpp, and function.cu:
main.cu
function.hpp
function.cu
Then, compile main.cu first with
nvcc -dc main.cu
. The following errors will appear (with the -dc flag in the compilation command line):