[mlir][linalg][python] Adapt the OpDSL to use scalars.
authorTobias Gysi <gysit@google.com>
Tue, 15 Jun 2021 08:35:10 +0000 (08:35 +0000)
committerTobias Gysi <gysit@google.com>
Tue, 15 Jun 2021 12:54:00 +0000 (12:54 +0000)
commit662f9bff337b99819301113fc8634eb5123b9e23
tree431376f4055ea6a20d8b06ba4f582a775b047cab
parent389e749c42307ae589f84c79cceb175e6c9b510b
[mlir][linalg][python] Adapt the OpDSL to use scalars.

The patch replaces the existing capture functionality by scalar operands that have been introduced by https://reviews.llvm.org/D104109. Scalar operands behave as tensor operands except for the fact that they are not indexed. As a result ScalarDefs can be accessed directly as no indexing expression is needed.

The patch only updates the OpDSL. The C++ side is updated by a follow up patch.

Differential Revision: https://reviews.llvm.org/D104220
mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
mlir/python/mlir/dialects/linalg/opdsl/lang/config.py
mlir/python/mlir/dialects/linalg/opdsl/lang/dsl.py
mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
mlir/python/mlir/dialects/linalg/opdsl/lang/scalar_expr.py
mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
mlir/test/python/dialects/linalg/opdsl/arguments.py
mlir/test/python/dialects/linalg/opdsl/assignments.py
mlir/test/python/dialects/linalg/opdsl/emit_structured_generic.py
mlir/test/python/dialects/linalg/opsrun.py