In case of cooperative kernel that is working (many iteration cycles with grid sync), sending new data on the GPU, will not couse any problem? - I need to orchestrate some work during kernel execution using CPU
I suppose in order to make it work i would need some asynchronous memory access, yet i do not intend to allocate memory just modify some values in it.
To clarify CPU will be solely responsible to write the data and GPU to read, or vice versa so there should not be data race between those two
I have couple hundreds of data blocks
size of those data blocks are such that one block of threads can process it
only some data blocks are in need of processing at given iteration
after all data blocks get processed i need to synchronize grid (grid sync from cooperative groups)
than work on new set of currently active data blocks
Now which data blocks will be active for processing or not is semi random hence tread block would need to check weather data block is active before proceeding, some block of threads would need to scan through the data and look for active data block, than using atomics mark that this one is currently under processing so other block would not duplicate work…
This seems wastefully and task to distribute work across blocks seems to be better suited for CPU, i would just have CPU managed list of data to work on associated with each block of threads,
Yet I wonder weather in case of cooperative kernel that is working, such messing with data, and sending new data on the GPU, in time when GPU is working will not couse any problem?