[PATCH] D80347: [mlir][Linalg] Add support for fusion between indexed_generic ops and generic ops on tensors.

Han-Chung Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 18:15:22 PDT 2020


hanchung created this revision.
hanchung added reviewers: mravishankar, nicolasvasilache, pifon2a, antiagainst.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, shauheen, jpienaar, rriddle, mehdi_amini, arphaman.
Herald added a project: LLVM.
hanchung added a child revision: D80348: [mlir][Linalg] Add support for fusion between indexed_generic ops and tensor_reshape ops.

Different from the fusion between generic ops, indices are involved. In this
context, we need to re-map the indices for producer since the fused op is built
on consumer's perspective. This patch supports all combination of the fusion
between indexed_generic ops and generic ops, which includes tests case:

1. generic op as producer and indexed_generic op as consumer.
2. indexed_generic op as producer and generic op as consumer.
3. indexed_generic op as producer and indexed_generic op as consumer.

Move FuseGenericOpsOnTensors::isFusisble and computeProducerOperandIndex out, so
we can reuse it in FuseIndexedGenericOpsOnTensors patterns.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80347

Files:
  mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
  mlir/test/Dialect/Linalg/fusion-tensor.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80347.265396.patch
Type: text/x-patch
Size: 23815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200521/e02ca2b6/attachment.bin>


More information about the llvm-commits mailing list