Skip to content

Conversation

@cferry-AMD
Copy link
Collaborator

@cferry-AMD cferry-AMD commented Jan 3, 2025

Tiling an op causes extract_slice ops to be inserted between the producer of its operands and the tiled operation, so the tiled operation works on a tile of the data.

Up to this PR, these extract_slices are left unused when tiling the producer itself. Even though DCE will eventually eliminate those unused ops, the producer op is not trivially dead at the end of tiling and until DCE runs. Therefore, the producer may still be matched by other patterns despite it being dead. In this case, this PR makes the producer trivially dead.

@mgehre-amd
Copy link
Collaborator

Is there a way to test this?

@cferry-AMD
Copy link
Collaborator Author

Yes, using the transform op that calls tiling and fusion. I figured the dead code was also there when using it, and would only go away after canonicalization. Now it goes away straight.

@cferry-AMD cferry-AMD enabled auto-merge (squash) January 6, 2025 13:55
@cferry-AMD cferry-AMD merged commit bada367 into feature/fused-ops Jan 6, 2025
4 checks passed
@cferry-AMD cferry-AMD deleted the corentin.tiling_extract_slice branch January 6, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants