Add a "register_runtime" method to the mlir.execution_engine and show calling back...
authorMehdi Amini <joker.eph@gmail.com>
Tue, 30 Mar 2021 04:35:36 +0000 (04:35 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 30 Mar 2021 17:04:38 +0000 (17:04 +0000)
commit7a4d630764829ad40738ae4e5944a411529728ef
treeb43aaebc45c1b004a3e808eaea0ab84c0496b601
parentc8e56f394af0b9e32c413d62a0e7aebbba3e6b70
Add a "register_runtime" method to the mlir.execution_engine and show calling back from MLIR into Python

This exposes the ability to register Python functions with the JIT and
exposes them to the MLIR jitted code. The provided test case illustrates
the mechanism.

Differential Revision: https://reviews.llvm.org/D99562
mlir/include/mlir-c/ExecutionEngine.h
mlir/lib/Bindings/Python/ExecutionEngine.cpp
mlir/lib/Bindings/Python/mlir/execution_engine.py
mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp
mlir/test/Bindings/Python/execution_engine.py