[PATCH] D124626: [AMDGPU] Produce waitcounts for LDS DMA

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 02:57:52 PDT 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1100
         unsigned AS = Memop->getAddrSpace();
-        if (AS != AMDGPUAS::LOCAL_ADDRESS)
+        if (AS != AMDGPUAS::LOCAL_ADDRESS && AS != AMDGPUAS::FLAT_ADDRESS)
           continue;
----------------
foad wrote:
> Was this a pre-existing bug, even if you don't use DMA instructions? E.g. for DS_STORE followed by FLAT_STORE were we missing a wait on expcnt to guarantee WAW order?
I thought so too, but it didn't get it in this scenario before and it doesn't get it after because there is no pending VM event. I just believe if anything it shall be vmcnt, not expcnt, although I do not see that documented. For DMA the reason for vmcnt is that we shall wait for vmem to be read, although a wait on lgkmt is not needed (does not seem to be properly documented either). For a pure ds_write it is likely not needed because we don't touch VMEM.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124626/new/

https://reviews.llvm.org/D124626



More information about the llvm-commits mailing list