Fold tensor.insert_slice(tensor.pad(<input>), linalg.fill) into
tensor.insert_slice(<input>, linalg.fill) if the padding value and
the filling value are the same.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
| Paths 
 |  Differential  D120410  
[mlir][linalg] Fold tensor.pad when inserting into linalg.fill ClosedPublic Authored by antiagainst on Feb 23 2022, 7:05 AM. 
Details Summary Fold tensor.insert_slice(tensor.pad(<input>), linalg.fill) into 
Diff Detail 
 Event Timelineantiagainst added a child revision: D120446: [mlir][linalg] Enhance FoldInsertPadIntoFill to support op chain.Feb 23 2022, 6:30 PM ThomasRaoux added inline comments. 
 This revision is now accepted and ready to land.Feb 28 2022, 12:58 PM antiagainst added inline comments. 
 Closed by commit rG5d47332783d0: [mlir][linalg] Fold tensor.pad when inserting into linalg.fill (authored by antiagainst).  ·  Explain WhyFeb 28 2022, 1:42 PM This revision was automatically updated to reflect the committed changes. antiagainst marked an inline comment as done. 
Revision Contents 
 
 
Diff 411881 mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
 mlir/test/Dialect/Linalg/canonicalize.mlir
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nit: you can still use CHECK-LABEL if you make the map name $MAP (as it prevents the variable to get cleared by CHECK-LABEL)