[PATCH] D79838: [mlir][Linalg] Add producer-consumer fusion when producer is a ConstantOp and Consumer is a GenericOp.
Nicolas Vasilache via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 21:13:33 PDT 2020
nicolasvasilache added a comment.
Herald added a subscriber: jurahul.
How much of this special casing is impacted by the lack of existence (today) of the tied input/output tensor.
It seems to me once we have that, the constant op would (roughly) look like:
%1 = linalg.generic {args_in = 1 : i64, args_out = 1 : i64, indexing_maps = [#map0], iterator_types = ["parallel"}] %0 {
^bb0(%arg1: f32, %arg2: f32):
%cst = constant 42.0: f32
linalg.yield %cst : f32
}: tensor<5xf32> -> tensor<5xf32>
And we would use a generic form of fusion.
I think it is fine for now to unblock progress but, if you agree, we should mark this as TBD.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79838/new/
https://reviews.llvm.org/D79838
More information about the llvm-commits
mailing list