When compiling a rather large CUDA kernel (a port of the raytracing application from the SPLASH2 benchmark suit), I get the following warning:
./hutv.cuh(959): Warning: Found conflicting memory spaces being pointed to
Before getting into more detail, I’d like to know what this warning really means. I suspect one of the following (in decreasing order of plausibility to me):
The compiler wants to put some pieces of code and / or data at overlapping memory sections? In this case, “memory spaces” would not allude to global, shared or constant memory but to different sections of program text / data? (The cubin file, obtained from nvcc -keep, has a size of 266KB. Probably much inlining takes place. Compilation with nvcc -arch sm_13 takes about 4.5 minutes.)
The compiler wants to put the same piece of data into (e.g.) global memory space at one time and into shared memory space at another time? (The line complained about is: “r->ri = ri;”)
I wouldn’t expect any problem with transfering data between different memory spaces (like global, shared, constant) like in e.g. “global_var.x = shared_result.x”.
I’d be glad if someone could point me to a source of information explaining the exact meaning of this warning message. What (kind of thing) would be the “memory spaces” and what (kind of thing) would it be that “pointed to” them…?
(The resulting executable can run the kernel many times with input data not accessing the code section complained about. Otherwise the kernel terminates with an ULF (unspecified launch failure). I’ve implemented some logging facilities: Rerunning the same executable first fetches data from the logging data structures in device memory, before these are initialized / cleared for the current run. Using this kind of hack I appear to be able to get logging data from the previous run producing an ULF. These data indicate that the single global function producing an ULF (detected immediately after the kernel call) actually finished in the previous run! The logging mark issued immediately before the last closing bracelet of the global function is present.)