This is an archive of the discontinued LLVM Phabricator instance.

[mlir][GPU] Prevent adding duplicate async tokens
ClosedPublic

Authored by krzysz00 on Oct 17 2022, 12:57 PM.

Details

Summary

If, in the GPU async transformation, the operation being given an
async dependency already depended on the token in question, we
would add duplicate tokens, creating issues in GPU to LLVM lowering.

To resolve this issue, add a check to addAsyncDependency() to ensure
that duplicate tokens are not present in the token list.

(I'm open to a different approach here, this is just what I went with
initially)

Diff Detail

Event Timeline

krzysz00 created this revision.Oct 17 2022, 12:57 PM
krzysz00 requested review of this revision.Oct 17 2022, 12:57 PM
Mogball accepted this revision.Oct 17 2022, 12:58 PM
Mogball added inline comments.
mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h
29–30
This revision is now accepted and ready to land.Oct 17 2022, 12:58 PM
krzysz00 added inline comments.Oct 17 2022, 1:23 PM
mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h
29–30

I noticed a convention of separating MLIR and LLVM includes in some other files, is there not one?

krzysz00 updated this revision to Diff 468340.Oct 17 2022, 2:55 PM

Remove newline per review feedback

krzysz00 updated this revision to Diff 468538.Oct 18 2022, 7:48 AM

Somehow, getAsyncDependencies() didn't get converted to prefixed form.

This revision was automatically updated to reflect the committed changes.