Initial MLIR python bindings based on the C API.

* Basic support for context creation, module parsing and dumping.

Differential Revision: https://reviews.llvm.org/D85481
This commit is contained in:
zhanghb97 authored and Stella Laurenzo committed 2020-08-16 19:34:25 -07:00
1 parent e10e7829bf
commit fcd2969da9
5 files changed
+113

No files matched your search

+5
View File
@@ -10,6 +10,7 @@
#include <pybind11/pybind11.h>
#include "IRModules.h"
#include "mlir/IR/MLIRContext.h"
using namespace mlir;
@@ -24,4 +25,8 @@ PYBIND11_MODULE(_mlir, m) {
return std::make_tuple(std::string("From the native module"),
context.isMultithreadingEnabled());
});
// Define and populate IR submodule.
auto irModule = m.def_submodule("ir", "MLIR IR Bindings");
populateIRSubmodule(irModule);
}