[mlir][linalg] Add an InitTensorOp python builder.
authorStella Laurenzo <stellaraccident@gmail.com>
Sat, 20 Mar 2021 01:16:45 +0000 (18:16 -0700)
committerStella Laurenzo <stellaraccident@gmail.com>
Thu, 25 Mar 2021 22:17:48 +0000 (15:17 -0700)
commitec294eb87be24764aac15d4df046a841f77f4b48
treed0438aee84930995e4ac222b9d4e8de437449090
parent3240910f000625957a6a01ff8758c892f72a3a0d
[mlir][linalg] Add an InitTensorOp python builder.

* This has the API I want but I am not thrilled with the implementation. There are various things that could be improved both about the way that Python builders are mapped and the way the Linalg ops are factored to increase code sharing between C++/Python.
* Landing this as-is since it at least makes the InitTensorOp usable with the right API. Will refactor underneath in follow-ons.

Differential Revision: https://reviews.llvm.org/D99000
mlir/lib/Bindings/Python/mlir/dialects/_linalg_ops_ext.py
mlir/lib/Bindings/Python/mlir/dialects/_ods_common.py
mlir/test/Bindings/Python/dialects/linalg/opdsl/emit_structured_generic.py
mlir/test/Bindings/Python/dialects/linalg/ops.py