Skip to content

Commit

Permalink
[Target] Implement pass inserting tensor.pad if required
Browse files Browse the repository at this point in the history
In the future we will have scenarios requiring padding to be inserted to be able to effectively tile and vectorize operations.

This pass implements the logic required to insert and optimize `tensor.pad` operations to pad operands of linalg operations to a multiple of a given number. The current logic only does so for tile sizes.

Optimization wise, the pass optimizes zero-padding to undef-padding where possible and attempts to fuse them into various operations when possible.

A future pass will lower `tensor.pad` to DMA transfers to fully integrate it into compilation flow.
  • Loading branch information
zero9178 committed Aug 21, 2024
1 parent 4f03746 commit 6247bb8
Show file tree
Hide file tree
Showing 5 changed files with 488 additions and 2 deletions.
1 change: 1 addition & 0 deletions codegen/compiler/src/Quidditch/Target/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ iree_cc_library(
"ConfigureForSnitch.cpp"
"DisableQuidditchVariant.cpp"
"LinkExecutables.cpp"
"PadToTilingConfig.cpp"
"ReluToMax.cpp"
"RemoveTrivialLoops.cpp"
"TensorTile.cpp"
Expand Down
Loading

0 comments on commit 6247bb8

Please sign in to comment.