Repository navigation
Fix the CPU-only ROCm routing errors and two font-scale UI flakes - #7469
Merged
Merged
Conversation
Two unrelated causes of red CI on every PR, both reproduced before fixing. ROCm routing: 12 errors on Repo tests (CPU). The spoof reports an AMD GPU, and unsloth_zoo pulls in bitsandbytes, which picks a compute backend at import. Once torch looks like a GPU is present, bnb loads its ROCm/CUDA ops, which a CPU-only torch cannot satisfy (no libhipblas.so.2, no torch._C._cuda_getCurrentRawStream), so the child died before printing RESULT. Nothing here tests bitsandbytes, so import it first, under the honest hardware. Reproduced in a CPU-only torch venv: 11 passed with 12 errors before, 23 passed after. Still 23 passed on a CUDA build. Font-scale UI: the select-viewport step pressed ArrowDown six times behind fixed sleeps, but Radix moves focus into the listbox after the content opens, so on a loaded runner the keys landed on the trigger and nothing scrolled. Wait on the overflow and press until it moves, bounded at 40. The same fixed-sleep pattern made open_appearance miss the dialog when the shortcut fired before the app wired its handler; alternate both chords on a bounded retry and wait for the control the caller is about to drive. Both were reproduced locally by running the suite against a real Studio under full CPU load. Original: 2 of 10 passed, with the exact CI signature 'keyboard did not scroll the select viewport: 0' five times. Fixed: 10 of 10.
danielhanchen
added a commit
to Datta0/unsloth-staging-3
that referenced
this pull request
Jul 26, 2026
danielhanchen
added a commit
to Datta0/unsloth-staging-3
that referenced
this pull request
Jul 26, 2026
danielhanchen
added a commit
to Datta0/unsloth-staging-3
that referenced
this pull request
Jul 26, 2026
danielhanchen
added a commit
to Datta0/unsloth-staging-3
that referenced
this pull request
Jul 26, 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.
Two unrelated causes of red CI on effectively every open PR. Both were reproduced before being fixed.
1. ROCm routing: 12 errors on
Repo tests (CPU)tests/studio/install/test_rocm_rdna_routing.pyspawns a child that spoofs torch as an AMD card.unsloth_zoopulls inbitsandbytes, which picks a compute backend at import time. Once the spoof reports a GPU, bnb loads its ROCm/CUDA ops, which a CPU-only torch cannot satisfy:The child then dies before printing
RESULT, and all 12 tests error withchild produced no result.Nothing in this file tests bitsandbytes, so it is now imported first, under the honest hardware, before the spoof starts lying. The spoof still governs what
unsloth_zoosees, which is what the test is about.This only reproduces on a CPU-only torch, which is why it passes locally for most people and fails in CI. Verified in a dedicated CPU-only torch venv:
11 passed, 12 errors23 passedStill
23 passedon a CUDA build, so the previously-passing case is unaffected.2. Font-scale UI: two flakes in
playwright_ui_font_scale.pyThe select viewport. The step pressed
ArrowDownsix times behind fixed sleeps. Radix moves focus into the listbox after the content opens, so on a loaded runner the keys land on the trigger and nothing scrolls, giving:It now waits for the overflow to exist and presses until the viewport actually moves, bounded at 40 presses. A genuine regression still fails, just after more tries.
The settings dialog.
open_appearancepressed each shortcut chord once behind a fixed 700 ms sleep, so a slow boot loses the dialog entirely (settings dialog did not open). It now alternates both chords on a bounded retry and waits for the control the caller is about to drive.Reproduction
Run against a real Studio under full CPU load, 5 runs per version, twice:
The exact CI signature,
keyboard did not scroll the select viewport: 0, appeared 5 times in the 10 unfixed runs and never in the fixed ones.That this is flake rather than detection is also visible upstream: the same assertion has failed on two unrelated PRs, one of which only swaps three CSS class tokens and cannot affect keyboard scrolling, while the same commit passes the same job on macOS and Windows.
Scope
Test-only. No production code is touched.