[mlir][OpDSL] Refactor function handling.
authorgysit <gysit@google.com>
Fri, 25 Feb 2022 15:04:38 +0000 (15:04 +0000)
committergysit <gysit@google.com>
Fri, 25 Feb 2022 15:05:32 +0000 (15:05 +0000)
commit4d4cb17da8509156ca690e3d7eaf2e00ab606780
treeab76c55d85d1706cc8206d2299159a6edbf50cfa
parent9f5f08476e8979046ad3a13865d984c428eae442
[mlir][OpDSL] Refactor function handling.

Prepare the OpDSL function handling to introduce more function classes. A follow up commit will split ArithFn into UnaryFn and BinaryFn. This revision prepares the split by adding a function kind enum to handle different function types using a single class on the various levels of the stack (for example, there is now one TensorFn and one ScalarFn).

Depends On D119718

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D120108
mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
mlir/python/mlir/dialects/linalg/opdsl/lang/scalar_expr.py
mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
mlir/test/python/dialects/linalg/opdsl/assignments.py
mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp