[PATCH] D120587: [AMDGPU] Use workgroup fences in test waitcnt-vscnt.ll

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 13:03:04 PST 2022


rampitec added a comment.

In D120587#3346456 <https://reviews.llvm.org/D120587#3346456>, @kerbowa wrote:

> In D120587#3346419 <https://reviews.llvm.org/D120587#3346419>, @rampitec wrote:
>
>> It does not seem to do what it did before. For example it used to test that only a vmcnt is produced or only a vscnt. Maybe duplicate these tests instead to create a _workgroup versions (like existing barrier_vmcnt_vscnt_flat_workgroup)?
>
> Yes, it doesn't test this anymore as it is until we optimize these fences which we will do soon. The problem is that the test was relying on the unique feature of barriers that will only insert the wait before if there are outstanding events of that type. With the child patch for "BackOffBarriers" feature, this doesn't work anymore. The "singlethread" fences should be removed regardless because they don't enforce any synchronization. So I don't think duplicating makes sense.
>
> One option is to keep the tests as they were but to add `-mattr=-back-off-barrier` to the test.
>
> Otherwise, we need another way to test that a waitcnt_vscnt is inserted only if there are outstanding events. We cannot use fences for this.

The easiest way is to use -mattr I guess. I recall this test was useful to verify that only a needed set of waits is produced.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120587



More information about the llvm-commits mailing list