MLIR  19.0.0git
Public Attributes | List of all members
ShapeDimension Struct Reference

Implements a simple high-level fusion pass on linalg structured operations. More...

Public Attributes

Value shape
 
unsigned dimension
 

Detailed Description

Implements a simple high-level fusion pass on linalg structured operations.

In each block, linalg ops are processed in reverse textual order. Given a linalg op O, fusion occurs by:

  1. inspecting the linalg ops that write into the views read by O. There are 2 cases: a) buffer case: use the SSA value of the views and a simple alias analysis on subview ops to determine producer-consumer dependences; b) tensor case: use SSA use-def chains on extract_slice ops;
  2. greedily fuse the linalg ops that produce the subview/extract_slice.
  3. inspect the fused ops and determine whether they have other remaining LinalgOp uses. If not, then erase the original producing linalg op.

More advanced use cases, analyses as well as profitability heuristics are left for future work.

Definition at line 56 of file Fusion.cpp.

Member Data Documentation

◆ dimension

unsigned ShapeDimension::dimension

Definition at line 58 of file Fusion.cpp.

◆ shape

Value ShapeDimension::shape

Definition at line 57 of file Fusion.cpp.


The documentation for this struct was generated from the following file: