GPU send interrupt to CPU

Hello,

lets say we have an application where:
when cpu wants a x operation makes a descriptor and puts it in a list.
The descriptors_list is visible to both cpu and gpu.
Gpu reads the descriptors_list and executes the x operation on the data specified by the descriptor. Continues with the next descriptor and so goes on.
So far so good.
I would like the cpu to just write the descriptor and then handle other tasks/processes and when gpu has the results ready to interrupt cpu.
Is this thought viable? Can gpu call cpu?
How the cpu will handle the interrupt? Should I have stg like priorities?
Is there another way to call cpu? (flag, semaphore…)
The only thing I know for sure is that I don’t want the cpu to wait on gpu calculations.
Of course I am not expecting for a solution but any ideas or suggestions will be extremely useful.

Thnx in advance

The CPU can poll using cudaStreamQuery().

Technically I would expect the GPU to have the ability to generate interrupts, but it’s not exposed in the API. (UNIX doesn’t seem to encourage using interrupts, with the limited number of user defined signals, and their restrictions.)

Let the GPU update a ready flag in host memory(after writing results to host memory in the kernel, you should use threadfence_system() before setting the ready flag).
On the CPU side, start a thread with a infinite loop, which polls the ready flag(maybe with a sleep(0) or yield() to be at bit CPU-nicer if you can tolerate the latency).

Also look at this discussion: The Official NVIDIA Forums | NVIDIA

Thank you very much but it is not desired to poll, spin or busy wait cpu…

http://idav.ucdavis.edu/research/projects/gpucpu_callbacks
http://code.google.com/p/gpu-cpu-callbacks/

no chance (imho) to get away without busy waiting on the host right now, as this functionality is not exposed by the driver.