Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-11-18 Thread Andrew Stubbs
On 18/11/2022 17:41, Tobias Burnus wrote: Attached is the updated/rediffed version, which now uses the builtin instead of the 'asm("s8"). The code in principle works; that is: If no private stack variables are copied, it works. Or in other words: reverse-offload target regions that don't use

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-11-18 Thread Tobias Burnus
Attached is the updated/rediffed version, which now uses the builtin instead of the 'asm("s8"). The code in principle works; that is: If no private stack variables are copied, it works. Or in other words: reverse-offload target regions that don't use firstprivate or mapping work, the rest would

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-10-12 Thread Tobias Burnus
On 12.10.22 19:09, Andrew Stubbs wrote: On 12/10/2022 15:29, Tobias Burnus wrote: Right, sorry, the buffer is circular, but the counter is linear. It simplified reservation that way, but it does mean that there's a limit to the number of times the buffer can cycle before the counter saturates.

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-10-12 Thread Andrew Stubbs
On 12/10/2022 15:29, Tobias Burnus wrote: On 29.09.22 18:24, Andrew Stubbs wrote: On 27/09/2022 14:16, Tobias Burnus wrote: Andrew did suggest a while back to piggyback on the console_output handling, avoiding another atomic access. - If this is still wanted, I like to have some guidance rega

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-10-12 Thread Tobias Burnus
On 29.09.22 18:24, Andrew Stubbs wrote: On 27/09/2022 14:16, Tobias Burnus wrote: Andrew did suggest a while back to piggyback on the console_output handling, avoiding another atomic access. - If this is still wanted, I like to have some guidance regarding how to actually implement it. [...] Th

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-09-29 Thread Andrew Stubbs
On 27/09/2022 14:16, Tobias Burnus wrote: @@ -422,6 +428,12 @@ struct agent_info if it has been. */ bool initialized; + /* Flag whether the HSA program that consists of all the modules has been + finalized. */ + bool prog_finalized; + /* Flag whether the HSA OpenMP's requires

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-09-27 Thread Tobias Burnus
For those without a working crystal ball, I have now also included the patch. On 27.09.22 15:15, Tobias Burnus wrote: This patch adds support to handle reverse offload to libgomp's plugin-gcn.c and to AMD GCN's libgomp target.c. In theory, that's all whats needed for GCN – in practice there a k