AkiRoss
AkiRoss

Reputation: 12273

Is it possible to interrupt a CUDA kernel from the host?

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

Answers (1)

talonmies
talonmies

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

Related Questions