Repository navigation
[ROCMTarget] Add pass for applying builtin specialization patterns - #21001
Merged
qedawkins merged 3 commits intoJun 24, 2025
Merged
Conversation
benvanik
reviewed
Jun 3, 2025
benvanik
reviewed
Jun 3, 2025
Contributor
Author
|
This is stalled on fixing #21019 and undoing the associated revert. |
qedawkins
force-pushed
the
apply_specialization_builtins
branch
from
June 16, 2025 20:48
5b20e43 to
5174dd2
Compare
Adds support for arch/sku specific PDL patterns to be loaded for finding and annotating ops with ranges to specialize for. This is a stopgap for a longer term solution where configuration logic uses range information directly and returns the set of ranges to specialize for itself. Today, IREE::Codegen::BlockDynamicDims uses the divisibility info to split out static dims that kernel config uses, meaning this has to happen before this pass. PDL modules aren't ideal for this use case because pattern rewrite sets require ownership over the module, but is lighter weight than transform dialect for this use case (basic matching + annotation). The reason for IR based patterns is two-fold 1. Arch/SKU specific ranges are often fixed to a few static best cases, meaning hand writing the ranges to annotate is fewer characters than emitting it with C++. 2. Adding support for new architectures is much faster to copy-paste an existing file and update the values than extending C++ switch statements.
qedawkins
force-pushed
the
apply_specialization_builtins
branch
from
June 16, 2025 21:02
3dc2bc5 to
355b837
Compare
qedawkins
marked this pull request as ready for review
June 16, 2025 21:02
MaheshRavishankar
left a comment
Collaborator
There was a problem hiding this comment.
I understand this PR by itself, but I am not sure how this connects to actual injection of the ping-pong kernel later on.
MaheshRavishankar
approved these changes
Jun 19, 2025
qedawkins
enabled auto-merge (squash)
June 24, 2025 02:56
qedawkins
disabled auto-merge
June 24, 2025 15:04
AWoloszyn
pushed a commit
that referenced
this pull request
Dec 1, 2025
…21001) Adds support for arch/sku specific PDL patterns to be loaded for finding and annotating ops with ranges to specialize for. This is a stopgap for a longer term solution where configuration logic uses range information directly and returns the set of ranges to specialize for itself. Today, IREE::Codegen::BlockDynamicDims uses the divisibility info to split out static dims that kernel config uses, meaning this has to happen before this pass. PDL modules aren't ideal for this use case because pattern rewrite sets require ownership over the module, but is lighter weight than transform dialect for this use case (basic matching + annotation). The reason for IR based patterns is two-fold 1. Arch/SKU specific ranges are often fixed to a few static best cases, meaning hand writing the ranges to annotate is fewer characters than emitting it with C++. 2. Adding support for new architectures is much faster to copy-paste an existing file and update the values than extending C++ switch statements.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for arch/sku specific PDL patterns to be loaded for finding and annotating ops with ranges to specialize for. This is a stopgap for a longer term solution where configuration logic uses range information directly and returns the set of ranges to specialize for itself.
Today, IREE::Codegen::BlockDynamicDims uses the divisibility info to split out static dims that kernel config uses, meaning this has to happen before this pass.
PDL modules aren't ideal for this use case because pattern rewrite sets require ownership over the module, but is lighter weight than transform dialect for this use case (basic matching + annotation). The reason for IR based patterns is two-fold