[all-commits] [llvm/llvm-project] 545fa3: [mlir] Affine: parallelize affine loops with reduc...
ftynse via All-commits
all-commits at lists.llvm.org
Thu Apr 29 04:16:51 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 545fa37834ef6b5731444728c00e7a18d4f1aeed
https://github.com/llvm/llvm-project/commit/545fa37834ef6b5731444728c00e7a18d4f1aeed
Author: Alex Zinenko <zinenko at google.com>
Date: 2021-04-29 (Thu, 29 Apr 2021)
Changed paths:
M mlir/include/mlir/Analysis/AffineAnalysis.h
M mlir/include/mlir/Analysis/Utils.h
M mlir/include/mlir/Dialect/Affine/Passes.td
M mlir/include/mlir/Dialect/Affine/Utils.h
M mlir/lib/Analysis/AffineAnalysis.cpp
M mlir/lib/Analysis/Utils.cpp
M mlir/lib/Dialect/Affine/Transforms/AffineParallelize.cpp
M mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
M mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
M mlir/lib/Dialect/Affine/Utils/Utils.cpp
M mlir/test/Dialect/Affine/parallelize.mlir
Log Message:
-----------
[mlir] Affine: parallelize affine loops with reductions
Introduce a basic support for parallelizing affine loops with reductions
expressed using iteration arguments. Affine parallelism detector now has a flag
to assume such reductions are parallel. The transformation handles a subset of
parallel reductions that are can be expressed using affine.parallel:
integer/float addition and multiplication. This requires to detect the
reduction operation since affine.parallel only supports a fixed set of
reduction operators.
Reviewed By: chelini, kumasento, bondhugula
Differential Revision: https://reviews.llvm.org/D101171
Commit: 6841e6afba00e78972061d2d9bb631c4ac38ad25
https://github.com/llvm/llvm-project/commit/6841e6afba00e78972061d2d9bb631c4ac38ad25
Author: Alex Zinenko <zinenko at google.com>
Date: 2021-04-29 (Thu, 29 Apr 2021)
Changed paths:
M mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
M mlir/include/mlir/IR/AffineMap.h
M mlir/include/mlir/IR/OpImplementation.h
M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
M mlir/lib/Dialect/Affine/Transforms/AffineLoopNormalize.cpp
M mlir/lib/Dialect/Affine/Utils/Utils.cpp
M mlir/lib/IR/AffineMap.cpp
M mlir/lib/IR/AsmPrinter.cpp
M mlir/lib/Parser/AffineParser.cpp
M mlir/lib/Parser/Parser.cpp
M mlir/lib/Parser/Parser.h
M mlir/test/Conversion/AffineToStandard/lower-affine.mlir
M mlir/test/Dialect/Affine/invalid.mlir
M mlir/test/Dialect/Affine/ops.mlir
M mlir/test/Dialect/Affine/parallelize.mlir
Log Message:
-----------
[mlir] support max/min lower/upper bounds in affine.parallel
This enables to express more complex parallel loops in the affine framework,
for example, in cases of tiling by sizes not dividing loop trip counts perfectly
or inner wavefront parallelism, among others. One can't use affine.max/min
and supply values to the nested loop bounds since the results of such
affine.max/min operations aren't valid symbols. Making them valid symbols
isn't an option since they would introduce selection trees into memref
subscript arithmetic as an unintended and undesired consequence. Also
add support for converting such loops to SCF. Drop some API that isn't used in
the core repo from AffineParallelOp since its semantics becomes ambiguous in
presence of max/min bounds. Loop normalization is currently unavailable for
such loops.
Depends On D101171
Reviewed By: bondhugula
Differential Revision: https://reviews.llvm.org/D101172
Compare: https://github.com/llvm/llvm-project/compare/de94b1855c63...6841e6afba00
More information about the All-commits
mailing list