[mlir] ODS-backed python binding generator for custom op classes
authorAlex Zinenko <zinenko@google.com>
Mon, 9 Nov 2020 16:29:21 +0000 (17:29 +0100)
committerAlex Zinenko <zinenko@google.com>
Tue, 10 Nov 2020 09:58:29 +0000 (10:58 +0100)
commitfd407e1f1eed7deb4818509a8393ee930480d7f5
treee5b145a490b3a0d1d10ce37f3444a8d1c2174815
parentb65ef65b22c225efd7755e2edf07c00b7911b969
[mlir] ODS-backed python binding generator for custom op classes

Introduce an ODS/Tablegen backend producing Op wrappers for Python bindings
based on the ODS operation definition. Usage:

  mlir-tblgen -gen-python-op-bindings -Iinclude <path/to/Ops.td> \
              -bind-dialect=<dialect-name>

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D90960
mlir/CMakeLists.txt
mlir/cmake/modules/AddMLIRPythonExtension.cmake
mlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt
mlir/lib/Bindings/Python/CMakeLists.txt
mlir/lib/Bindings/Python/mlir/dialects/__init__.py
mlir/lib/Bindings/Python/mlir/dialects/std.py [deleted file]
mlir/test/Bindings/Python/dialects.py
mlir/test/Bindings/Python/dialects/std.py [new file with mode: 0644]
mlir/test/mlir-tblgen/op-python-bindings.td [new file with mode: 0644]
mlir/tools/mlir-tblgen/CMakeLists.txt
mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp [new file with mode: 0644]