Add an escape-hatch for conversion of funcs with blocking awaits to coroutines.
authorbakhtiyar <bakhtiyar@x.team>
Wed, 28 Jul 2021 22:25:00 +0000 (15:25 -0700)
committerEugene Zhulenev <ezhulenev@google.com>
Thu, 29 Jul 2021 15:52:28 +0000 (08:52 -0700)
commit9a5bc83660ed6978521dcfa4faac140cf5b2e895
tree2edd14074a1d08e608482854f59ef13b96b0f0a8
parent2a342c7c1ee18817a5f8bb4d32cfc4bce6f9aecd
Add an escape-hatch for conversion of funcs with blocking awaits to coroutines.

Currently TFRT does not support top-level coroutines, so this functionality will allow to have a single blocking await at the top level until TFRT implements the necessary functionality.

Reviewed By: ezhulenev

Differential Revision: https://reviews.llvm.org/D106730
mlir/include/mlir/Dialect/Async/IR/AsyncDialect.td
mlir/include/mlir/Dialect/Async/Passes.td
mlir/lib/Dialect/Async/IR/Async.cpp
mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
mlir/test/Dialect/Async/async-to-async-runtime-eliminate-blocking.mlir