Is there any sample code for generating core dump?

I want to create CUDA core dump.
Is there any sample code for creating core dump?
I am try to throw error on __global__ but it is not supported.

Reference

I assume you are using linux. An example of creating a core dump is given here.

If you want to throw an error on __global__ (i.e. throw a C++ style error if the kernel hits a runtime-detected fault) you can use the method given here. (you would use that wrapper on a cudaDeviceSynchronize() call after the kernel call, as one possible example.)

1 Like