Create Reduction Tree Pass
authorMauricio Sifontes <sifontes@google.com>
Fri, 7 Aug 2020 23:17:27 +0000 (23:17 +0000)
committerMauricio Sifontes <sifontes@google.com>
Fri, 7 Aug 2020 23:17:31 +0000 (23:17 +0000)
commit27d0e14da9b4676a9d97b06618af248aadc21594
tree235b79dc4d62af7f3f36eb3a67e93f56f403e69e
parentabb9bf4bcf98a226d9350448e31411eb55e9efb0
Create Reduction Tree Pass

Implement the Reduction Tree Pass framework as part of the MLIR Reduce tool. This is a parametarizable pass that allows for the implementation of custom reductions passes in the tool.
Implement the FunctionReducer class as an example of a Reducer class parameter for the instantiation of a Reduction Tree Pass.
Create a pass pipeline with a Reduction Tree Pass with the FunctionReducer class specified as parameter.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D83969
16 files changed:
mlir/include/mlir/CMakeLists.txt
mlir/include/mlir/Reducer/CMakeLists.txt [new file with mode: 0644]
mlir/include/mlir/Reducer/PassDetail.h [new file with mode: 0644]
mlir/include/mlir/Reducer/Passes.td [new file with mode: 0644]
mlir/include/mlir/Reducer/Passes/FunctionReducer.h [new file with mode: 0644]
mlir/include/mlir/Reducer/ReductionNode.h [new file with mode: 0644]
mlir/include/mlir/Reducer/ReductionTreePass.h [new file with mode: 0644]
mlir/include/mlir/Reducer/Tester.h
mlir/lib/Reducer/Tester.cpp
mlir/test/mlir-reduce/failure-test.sh [new file with mode: 0755]
mlir/test/mlir-reduce/reduction-tree-pass.mlir [new file with mode: 0644]
mlir/tools/mlir-reduce/CMakeLists.txt
mlir/tools/mlir-reduce/Passes/FunctionReducer.cpp [new file with mode: 0644]
mlir/tools/mlir-reduce/ReductionNode.cpp [new file with mode: 0644]
mlir/tools/mlir-reduce/ReductionTreePass.cpp [new file with mode: 0644]
mlir/tools/mlir-reduce/mlir-reduce.cpp