[all-commits] [llvm/llvm-project] e3b442: [mlir][OpDSL] Separate `ReduceFn` and `ReduceFnUse`.
Tobias Gysi via All-commits
all-commits at lists.llvm.org
Fri Jan 7 04:57:45 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3b442b62f44491514b10b0dd3949b3259ce80f3
https://github.com/llvm/llvm-project/commit/e3b442b62f44491514b10b0dd3949b3259ce80f3
Author: gysit <gysit at google.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M mlir/docs/Dialects/Linalg/OpDSL.md
M mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
M mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
M mlir/test/python/dialects/linalg/opdsl/emit_pooling.py
Log Message:
-----------
[mlir][OpDSL] Separate `ReduceFn` and `ReduceFnUse`.
The revision distinguishes `ReduceFn` and `ReduceFnUse`. The latter has the reduction dimensions attached while the former specifies the arithmetic function only. This separation allows us to adapt the reduction syntax a little bit and specify the reduction dimensions using square brackets (in contrast to the round brackets used for the values to reduce). It als is a preparation to add reduction function attributes to OpDSL. A reduction function attribute shall only specify the arithmetic function and not the reduction dimensions.
Example:
```
ReduceFn.max_unsigned(D.kh, D.kw)(...)
```
changes to:
```
ReduceFn.max_unsigned[D.kh, D.kw](...)
```
Depends On D115240
Reviewed By: stellaraccident
Differential Revision: https://reviews.llvm.org/D115241
More information about the All-commits
mailing list