Hi. I’m trying to use cuprintf in a setup where I have multiple files. a “main” file, and the function files… so I’ve made this small setup here. But I can’t seem to figure out how to import cuprintf.cu or cuprintf.cuh corretly .
Anyone having an idea on where I go wrong ?
KG.
The files are as follows
//test.cu
#include "cuPrintf.cuh"
extern "C" void launch_kernel ();
int main() {
cudaPrintfInit();
cudaPrintfDisplay(NULL, true);
cudaPrintfEnd();
return 0;
}
//test_kernels.cu
#include "cuPrintf.cu"
__global__ void testKernel(int val) { cuPrintf("Value is: %d\n", val); }
extern "C" void launch_kernel () {testKernel<<< 2, 3 >>>(10); }