From 42328363b8b7812d1cee78fdab1f52351a47adc1 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Mon, 21 Dec 2020 02:44:44 -0800 Subject: [PATCH] [tfrt:mlir] Implement MLIR Async Runtime API on top of TFRT host concurrency primitives 1. Implement MLIR Async Runtime API as ::tfrt::cpu::jit::AsyncRuntime 2. Add a tfrt_cpu_runner (mlir-cpu-runner with statically linked async runtime) for testing AsyncRuntime + runtime SymbolMap passed to MLIR ExecutionEngine will be the foundation of CPU-JIT kernels in TFRT. MLIR Async Runtime: https://github.com/llvm/llvm-project/blob/master/mlir/include/mlir/ExecutionEngine/AsyncRuntime.h#L35 PiperOrigin-RevId: 348437786 Change-Id: Ie45d6bf881b985436b0c07ed6da6e40c07e15de3 --- third_party/mlir/BUILD | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/third_party/mlir/BUILD b/third_party/mlir/BUILD index ae6c9e3f7a1..94136259559 100644 --- a/third_party/mlir/BUILD +++ b/third_party/mlir/BUILD @@ -4069,15 +4069,18 @@ cc_library( ) cc_library( - name = "mlir_async_runtime", - srcs = [ - "lib/ExecutionEngine/AsyncRuntime.cpp", - ], - hdrs = [ - "include/mlir/ExecutionEngine/AsyncRuntime.h", - ], + name = "mlir_async_runtime_api", + hdrs = ["include/mlir/ExecutionEngine/AsyncRuntime.h"], includes = ["include"], - deps = ["@llvm-project//llvm:Support"], +) + +cc_library( + name = "mlir_async_runtime", + srcs = ["lib/ExecutionEngine/AsyncRuntime.cpp"], + deps = [ + ":mlir_async_runtime_api", + "@llvm-project//llvm:Support", + ], ) cc_library(