Login  Register

Concurrent Kernels + Synchronization + JOCL

Posted by Giovanni Idili on Apr 20, 2011; 8:51pm
URL: https://forum.jogamp.org/Concurrent-Kernels-Synchronization-JOCL-tp2843784.html

First of all I apologize for my ignorance. I am starting with OpenCL and JOCL and I am still trying to come to terms with a few basic concepts.

Here we go:

1) can I upload more than one kernel at a time to a given device assigning different workgroups (or queues) to each kernel so that they can execute concurrently (or do I need 1 device per kernel)?

2) If so, can I exchange data between workgroups running different kernels and somehow synchronize them?

Just to give a bit of background, I would like to use JOCL + OpenCL for a multiscale simulation (different kernels required) and I am trying to understand what are my options.

Could I do this entirely by concurrently uploading kernels to one or more devices or is it necessary to have some higher level code to orchestrate everything and pull out results from the different queues and synchronize the different simulations (some stuff can be a biology some other stuff physics, with different time scales, etc.) as needed?

I would like to minimize the I/O operations to the devices, as I understand that's where the bottleneck is.

Any JOCL examples related to points 1) and/or 2) appreciated!

Any pointer that could help me understand more about this - concurrency/synchronization and if it is possible to orchestrate this stuff from JOCL - would also be highly appreciated.