-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDAIEFuseFillIntoForall] Handle case where fill output is not sliced (
#976) For 2x2 or 4x4 tiling the chain of ops after the fill looks like ``` %9 = linalg.fill ins(%cst : f32) ... ... %12 = scf.forall (%arg3, %arg4) in (2, 2) shared_outs(%arg5 = %9) ... ... %extracted_slice_19 = tensor.extract_slice %arg5 ... ... %19 = linalg.generic ... outs(%extracted_slice_19 ... ) ``` i.e. the filled value enters an extract_slice inside the scf.forall. But for 1x1 tiling, it looks like ``` %9 = linalg.fill ins(%cst : f32) ... %14 = scf.forall (%arg3, %arg4) in (1, 1) shared_outs(%arg5 = %9) ... %19 = linalg.generic ... outs(%arg5... ) ``` i.e. there is no intermediate extract_slice. Before this PR, the logic was hardcoded to look for an extrac_slice, this PR relaxes this.
- Loading branch information
Showing
2 changed files
with
109 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters