[mlir][python] Function decorator for capturing a FuncOp from a python function.
authorStella Laurenzo <stellaraccident@gmail.com>
Fri, 19 Mar 2021 22:43:42 +0000 (15:43 -0700)
committerStella Laurenzo <stellaraccident@gmail.com>
Sat, 20 Mar 2021 01:27:21 +0000 (18:27 -0700)
commitd9343e61534f54665b2be6dd8bc2e051220d3beb
tree7f43a98236c85f7d7c312588cdb05b202b9cd0ac
parentb76c09023d9a341353d7bcae1782154d80121838
[mlir][python] Function decorator for capturing a FuncOp from a python function.

* Moves this out of a test case where it was being developed to good effect and generalizes it.
* Having tried a number of things like this, I think this balances concerns reasonably well.

Differential Revision: https://reviews.llvm.org/D98989
mlir/lib/Bindings/Python/mlir/dialects/_builtin_ops_ext.py
mlir/test/Bindings/Python/dialects/builtin.py
mlir/test/Bindings/Python/dialects/linalg/opdsl/emit_structured_generic.py