HomePhabricator

[mlir][Linalg] Add support for fusion between indexed_generic ops and generic…

Authored by hanchung on Jun 3 2020, 2:58 PM.

Description

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

Summary:
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.

Differential Revision: https://reviews.llvm.org/D80347