Repository navigation
Studio int8 GEMM: the unlisted-card race switch acts between loads - #17084
Merged
Merged
Conversation
UNSLOTH_DIFFUSION_INT8_GEMM_RACE=0 was read only before a winner was kept, so turning it off after the first load still returned the raced tile; the latency verdict was also keyed without the tile. The switch is now read per load ahead of the kept winner (off = the fallback tile), and the verdict is keyed by tile.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[skip ci]
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Nov 8, 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.
Problem
#17026 races a few Triton tiles for the int8 GEMM on cards with no measured tile table (unlisted sm80+ cards), and keeps the winner for the process.
UNSLOTH_DIFFUSION_INT8_GEMM_RACE=0is meant to keep the fallback tile.device_configre-reads the unlisted path per call "so its switch acts between loads", but the race switch was only read before a winner was kept:(256, 128, 128, 8, 8, 3);UNSLOTH_DIFFUSION_INT8_GEMM_RACE=0, next load: still the raced winner instead of the fallback(128, 128, 64, 8, 4, 4).The fused-vs-stock latency verdict was also cached per
(card, mode)without the tile, so a verdict measured for one tile was reused for another.A process started with the switch already off behaved correctly. Only an in-process change (a rollback between loads, an A/B in one server) was ignored.
Change
_unlisted_tilereads the switch on every load, ahead of the kept winner: off returns the fallback tile, on returns the kept winner (no second race).(card, mode, tile).Nothing changes for a process that never flips the switch: the same race, the same persisted winner, the same verdict.
Tests
test_race_switch_acts_between_loads_after_a_winner_is_kept(fake sm86 probe / race / latency harness): winner, then the fallback with the switch off (with its own latency check), then the kept winner again with one race in total.test_diffusion_int8_gemm_unlisted.py+test_diffusion_int8_gemm.pya174823)