[PATCH] D80188: [mlir][Linalg] Avoid using scf.parallel for non-parallel loops in Linalg ops.
Nicolas Vasilache via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 20 05:56:03 PDT 2020
nicolasvasilache added a comment.
I think there are a few issues at this time.
The GenericBuilder is introduced by Linalg because that is the place in spacetime that uses both affine and scf.
This CL ties the implementation of GenericBuilder to more Linalg internals which leaks more abstractions.
I have https://reviews.llvm.org/D80290 which retires a bunch of now unused stuff.
This should make this CL simpler after rebasing.
On the change itself, this does not seem to support interleaving.
I think I would rather try to go for a recursive helper function that takes ArrayRef slices and a leaf lambda but otherwise leaves GenericLoopNestBuilder untouched.
This should also evolve better when we have more loop types.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp:387
+ GenericLoopNestRangeBuilder<LoopTy>(ivs, linalgRanges,
+ op.iterator_types().getValue())([&] {
auto &b = ScopedContext::getBuilderRef();
----------------
you also want to apply the interchange vector with `applyPermutationToVector`
================
Comment at: mlir/test/Dialect/Linalg/tile_parallel_reduce.mlir:23
+// CHECK: linalg.matmul(%[[SV1]], %[[SV2]], %[[SV3]])
\ No newline at end of file
----------------
nit: newline
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80188/new/
https://reviews.llvm.org/D80188
More information about the llvm-commits
mailing list