2

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?

4

1 回答 1

3

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.

于 2013-05-06T17:45:53.257 回答