Best way for near-real-time communication between kernels and host in SPIR


The most important uses for this might be:
[li]Quasi immediate stop of all excuting kernels if host decides so, or if some fatal error occured at either side. Also used if one kernel decides it’s best to stop all other executing kernels or, if possible, cancel kernels still on the Queue.
[/li][li]Allow progress/status monitoring by the host of work progress by (regularly) communicating done/total cycles ratio or a stage enum. Could be host request based, as host can base on regular time events.
[/li][li]Allow cumulative non fatal error/warning messages list in realtime to the host.
[/li][li]dynamic modification of calculation parameters by the host


I’m working now on a a “Shuttle kernel”, which exchanges Control and status information between host and worker kernels. The shuttle kernel should be launched every 100 ms or so and finish its work within a few milliseconds or less. Launching the shuttle kernel is based on a repetitive timer at the host side. Does anyone have a better idea or is this a sound approach? This approach allows all objectives in my original Question all at once.