Re: [PATCH] [og10] amdgcn: Add waitcnt after LDS write instructions

2020-06-29 Thread Stubbs, Andrew
On 29 Jun 2020 22:03, "Brown, Julian" wrote: On Mon, 29 Jun 2020 21:32:41 +0100 Andrew Stubbs wrote: > In particular, it seems logical that any barrier should be a memory > barrier, so inserting it in the barrier pattern is not a big deal. > IIRC, only OpenACC is using that anyway (OpenMP has exp

Re: [PATCH] [og10] amdgcn: Add waitcnt after LDS write instructions

2020-06-29 Thread Julian Brown
On Mon, 29 Jun 2020 21:32:41 +0100 Andrew Stubbs wrote: > On 29/06/2020 21:16, Julian Brown wrote: > > Data-share write (ds_write) instructions do not necessarily complete > > the write to LDS immediately. When a write completes, LGKM_CNT is > > decremented. For now, we wait until LGKM_CNT reache

Re: [PATCH] [og10] amdgcn: Add waitcnt after LDS write instructions

2020-06-29 Thread Andrew Stubbs
On 29/06/2020 21:16, Julian Brown wrote: Data-share write (ds_write) instructions do not necessarily complete the write to LDS immediately. When a write completes, LGKM_CNT is decremented. For now, we wait until LGKM_CNT reaches zero after each ds_write instruction. This fixes a race condition i

[PATCH] [og10] amdgcn: Add waitcnt after LDS write instructions

2020-06-29 Thread Julian Brown
Data-share write (ds_write) instructions do not necessarily complete the write to LDS immediately. When a write completes, LGKM_CNT is decremented. For now, we wait until LGKM_CNT reaches zero after each ds_write instruction. This fixes a race condition in the case where LDS is read immediately af