Split arithmetic function into unary and binary functions. The revision prepares the introduction of unary and binary function attributes that work similar to type function attributes.
Depends On D120108
Paths
| Differential D120109
[mlir][OpDSL] Split arithmetic functions. ClosedPublic Authored by gysit on Feb 17 2022, 11:59 PM.
Details Summary Split arithmetic function into unary and binary functions. The revision prepares the introduction of unary and binary function attributes that work similar to type function attributes. Depends On D120108
Diff Detail
Event Timelinegysit added a child revision: D120110: [mlir][OpDSL] Add arithmetic function attributes..Feb 18 2022, 12:00 AM Comment Actions I had a broader look at this at well. It is actually surprising that this change does not touch more tests. Do we need a few more just for this change?
Comment Actions
Yes, I think one reason is that the revision before (https://reviews.llvm.org/D120108) - I have added you in meantime - refactors the function handling to make sure all function type share the same base logic below the hood. Additionally, the follow up revsion (https://reviews.llvm.org/D120110) finally introduces function attributes and introduces additional tests. In particular, it has a nice integration test for a configurable pooling operation. I already ported back a test introduced in https://reviews.llvm.org/D120110 and will also add an additional test on the yaml generation side. There is also a number of existing tests that for example check the lowering of unary functions works end to end (generalize-named-polymorphic-ops.mlir lowers softmax to exps and logs).
This revision is now accepted and ready to land.Feb 24 2022, 10:53 AM Closed by commit rGcd2776b0d5d7: [mlir][OpDSL] Split arithmetic functions. (authored by gysit). · Explain WhyFeb 25 2022, 7:29 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 411092 mlir/docs/Dialects/Linalg/OpDSL.md
mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
mlir/test/python/dialects/linalg/opdsl/assignments.py
mlir/test/python/dialects/linalg/opdsl/emit_misc.py
mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
|
you have two examples of binary, so use two example of unary
(in particular, because _exp could be mistaken for expression at first glance ;-)