Repository navigation
finegrained-kernels: fix tuner selection and expose phase controls - #1237
Open
IlyasMoutawwakil wants to merge 15 commits into
Open
IlyasMoutawwakil wants to merge 15 commits into
IlyasMoutawwakil wants to merge 15 commits into
Conversation
Limit budget-one searches to one successful measurement, retry failed configurations, and skip refinement and winner runoff. Keep larger budgets unchanged and verify measurement counts through the public loader without GPU kernels.
|
This PR changes source code for the following kernel(s): If you have the kernel-bot build permissions, then trigger |
3 of 4 tasks
Comment on lines
+59
to
+60
| # Include the tuner implementation alongside Triton's kernel-source hash. | ||
| _TUNER_SOURCE_HASH = hashlib.sha256(Path(__file__).read_bytes()).hexdigest() |
Member
Author
There was a problem hiding this comment.
to dismiss cached tunes that used an old version
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.
Expose controls for basin probes, refinement iterations, and winner remeasurement through decorator arguments and
FINEGRAINED_AUTOTUNE_BASIN_PROBES,FINEGRAINED_AUTOTUNE_MAX_REFINE_ITERS, andFINEGRAINED_AUTOTUNE_RUNOFF. Probes and runoff default to enabled; refinement defaults to five iterations, with zero disabling it. Correctness runs can set the trial budget to one and all three controls to zero. Version 1 accounts for replacing the oldrefineargument with the iteration limit.Fix basin anchors that could select extreme K, warp, and stage settings through a lexicographic median. Choose interior candidates across numeric axes and retain a wide output-tile anchor per declared compute path. Cache identity includes the kernel and tuner source hashes plus the effective phase settings.
Choose the runoff winner only from its remeasured finalists. Previously an unremeasured fourth candidate could win using a stale search-time sample. The existing timer remains unchanged.
Validation: ten focused autotuner checks passed, including anchor selection, runoff selection, failed-candidate handling and compile-failure memoization. The runoff regression reproduces the stale winner before the fix. The public API version check, Ruff and diff checks passed.
Supersedes #1243.
Related issue
Requested by a maintainer for huggingface/transformers#49658.
Checklist