[PATCH] D74638: [mlir][Linalg] Allow specifiying zero-rank shaped type operands to linalg.generic ops.
Han-Chung Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 18:21:42 PST 2020
hanchung added inline comments.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:346-351
for (unsigned i = 0; i < nInputs; ++i) {
ValueHandleArray indexing(makeCanonicalAffineApplies(
b, loc, indexedGenericOp.getInputIndexingMap(i), allIvs));
indexedValues[nLoops + i] =
std_load(indexedGenericOp.getInput(i), indexing);
}
----------------
This part should also be updated with
```
Value input = indexedGenericOp.getInput(i);
if (!input.getType().cast<ShapedType>().getRank()) {
indexedValues[nLoops + i] = std_load(input);
} else {
ValueHandleArray indexing(makeCanonicalAffineApplies(
b, loc, indexedGenericOp.getInputIndexingMap(i), allIvs));
indexedValues[nLoops + i] = std_load(input, indexing);
}
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74638/new/
https://reviews.llvm.org/D74638
More information about the llvm-commits
mailing list