Include extra specialization in specialization_key#1883
Merged
jansel merged 4 commits intopytorch:mainfrom Apr 3, 2026
Merged
Conversation
fulvius31
approved these changes
Mar 30, 2026
Collaborator
There was a problem hiding this comment.
LGTM but base_search.py should use _base_specialization_key() so that FROM_BEST_AVAILABLE matches across different hl.specialize values and seeds the autotuner with prior good configs instead of falling back to defaults.
It's not the scope of this PR, I'll follow up with another PR when this get merged.
I am not sure if this would cause any existing autotuning cache results to miss.
Yes but I don't think is relevant.
jansel
reviewed
Apr 1, 2026
jansel
approved these changes
Apr 3, 2026
fulvius31
added a commit
to fulvius31/helion
that referenced
this pull request
Apr 3, 2026
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.
Addresses #1209
specialization_key()now returns the full specialization key, including constraints discovered during compilation. There might be a more elegant solution to this but would likely involve more risk and potential for introducing bugs. Hoping that this fully addresses #1209.Changes
_base_specialization_key()fromspecialization_key()for internal usespecialization_key()appends compilation-discovered extras (e.g. fromhl.specialize()) when availablebind(),local_cache.py, andaot_cache.pyto use_base_specialization_key()internallytest_specialize.pyNote
Before the first compilation, extras are not yet known, so the key may still be incomplete. I am not sure if this would cause any existing autotuning cache results to miss.