Start Async dialect for modeling asynchronous execution.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/Async/IR/AsyncOps.td | ||
---|---|---|
50 | nit: Please do not put usernames in TODOs. |
LG but please wait for @herhut to have a look
mlir/include/mlir/Dialect/Async/IR/Async.h | ||
---|---|---|
14 | Can you fix the clang-tidy warning? | |
mlir/include/mlir/Dialect/Async/IR/AsyncBase.td | ||
38 | ||
mlir/include/mlir/Dialect/Async/IR/AsyncOps.td | ||
32 | I think it is important to clarify whether it is guaranteed that they will execute concurrently, i.e. is it valid to have in compute0 a spin-lock on a flag that has to be set by compute1. | |
55 | Could skip the type entirely here? |
Fix typos
mlir/include/mlir/Dialect/Async/IR/AsyncOps.td | ||
---|---|---|
32 | I think it is important to have sequential execution legal, clarified it in description. | |
55 | I was thinking that with an addition of return values from async regions, it will be clearer to have an explicit token return type. Example: %0#2 = async.region { %1 = alloc : memref<10xf32> async.yield %0 : memref<10xf32> } : () -> (!async.token, !async.value<memref<10xf32>>) ^ ^ | | region completed return value is ready |
Thanks for starting this!
mlir/include/mlir/Dialect/Async/IR/AsyncOps.td | ||
---|---|---|
55 | Do we need both types here? Does it ever happen that the async.value is ready before or after the async.token becomes ready? I can see that we want a async.value<void> like thing in case the async.region does not produce a value (and we can name it async.token). I am just not sure about requiring it to always be present. |
mlir/include/mlir/Dialect/Async/IR/AsyncOps.td | ||
---|---|---|
55 | Not sure about that. Having a token is convenient when you have two async regions that produce values, however there is no "true data dependency" between them. Example: %0:3 = async.execute (%arg : memref) { } : !async.token, !async.value<foo>, !async.value<bar> %1 = async.execute [%0#1](%arg : memref) { ... do not need the value foo here } : ... both regions read-write into memref (e.g. scratch buffer) but second op does not need any of the produced values. Token can be constructed from any async value, but then it becomes a question, which value to choose. I feel that explicit token makes semantics clearer. |
mlir/include/mlir/Dialect/Async/IR/AsyncOps.td | ||
---|---|---|
55 | It seems easier to me to handle the region with having always this token there: it makes it more regular. |
clang-tidy: warning: header guard does not follow preferred style [llvm-header-guard]
not useful