Reputation: 12273
I would like to interrupt "gently" a running kernel, that is: send it a signal of some sort (via global memory?), let it do its cleaning stuff and return to host.
I tried a simple program, using the *nix signal()
function to change a bit on the global memory using a regular cudaMemcpy
, but without success.
Is it possible? Is it possible for the host to write onto the device's memory while a kernel is running?
Upvotes: 2
Views: 764
Reputation: 72348
No it isn't possible.
While you might be tempted to think that zero copy allows this, there is no guarantee of memory coherence between the host and device across the PCI express bus while a kernel is running.
Upvotes: 3