Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flow] Generalize horizontal contraction fusion to cover more cases. (#…
…17880) Current implementation of horizontal fusion worked only for contraction (-> truncf)? cases. To generalize it to more cases the following changes were needed 1) Instead of looking for a `linalg.generic` with a single `arith.truncf`, use `isBitTruncate` utility method. To enable this the pass is moved to `Flow`. 2) Use `Operation::Equivalence` to check that the contraction operations are "similar" and any subsequent truncation operations are "similar" too. 3) Instead of trying to find an insertion point based on existing dominance relationship between operations, - Always insert the horizontally fused contraction before the first contraction - Always insert the horizontally fused truncation operation before the first truncation operation 4) Instead of generating the fills/empty along with horizontally fused operations, use separate patterns to fold concats of fills and concats of emptys into fill and empty, respectively. Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com> --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com>
- Loading branch information