This is an archive of the discontinued LLVM Phabricator instance.

[mlir][gpu] Add gpu.host_wait op.
AbandonedPublic

Authored by csigg on Oct 8 2020, 6:50 AM.

Details

Reviewers
herhut
Summary

This op could naturally be combined with gpu.create_token, by making a token result optional: If it returns a token, it behaves like create_token. Otherwise, it behaves like host_wait.
I do like the idea of combining them, but I don't have a good name for it, and the two use cases are quite different (create_token is created by lowering within GPU only, host_wait is added upstream).

Diff Detail

Event Timeline

csigg created this revision.Oct 8 2020, 6:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2020, 6:50 AM
csigg requested review of this revision.Oct 8 2020, 6:50 AM
herhut added inline comments.Oct 9 2020, 3:36 AM
mlir/include/mlir/Dialect/GPU/GPUOps.td
776

Hmm, is this op really asynchronous? I find it strange that it implements this interface. It also breaks the assumption that all asynchronous operations return a token to sync on their effects.

Also, as all operands of this op are tokens, we already naturally have a way to add extra operands.

787

Is this actually needed?

794

I like the syntax with [] for tokens. But as this is not an async operation, maybe it should have the tokens as proper operands with ()?

csigg abandoned this revision.Oct 13 2020, 8:55 AM