[PATCH] D78226: [MLIR] Improve support for 0-dimensional Affine Maps.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 12:03:41 PDT 2020
rriddle accepted this revision.
rriddle marked an inline comment as done.
rriddle added inline comments.
This revision is now accepted and ready to land.
================
Comment at: mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h:34
+ auto mapC = AffineMapAttr::get(AffineMap::get(3, 0, {m, n}, context));
+ auto maps = ArrayAttr::get({mapA, mapB, mapC}, context);
return indexingMaps == maps;
----------------
Unrelated to this revision, but I don't see why this ArrayAttr needs to be generated.
================
Comment at: mlir/lib/IR/AffineMap.cpp:130
inferFromExprList(ArrayRef<AffineExprContainer> exprsList) {
+ assert(exprsList.size() != 0);
+ assert(exprsList[0].size() != 0);
----------------
nit: prefer empty instead of size.
================
Comment at: mlir/lib/IR/Builders.cpp:300
AffineMap Builder::getDimIdentityMap() {
- return AffineMap::get(/*dimCount=*/1, /*symbolCount=*/0,
- {getAffineDimExpr(0)});
+ return AffineMap::get(/*dimCount=*/1, /*symbolCount=*/0, getAffineDimExpr(0));
}
----------------
Is this wrapped at 80 characters?
================
Comment at: mlir/lib/Transforms/PipelineDataTransfer.cpp:102
+ auto modTwoMap =
+ AffineMap::get(/*dimCount=*/1, /*symbolCount=*/0, d0.floorDiv(step) % 2);
auto ivModTwoOp = bInner.create<AffineApplyOp>(forOp.getLoc(), modTwoMap,
----------------
Same here, is this formatted?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78226/new/
https://reviews.llvm.org/D78226
More information about the llvm-commits
mailing list