Repository navigation
Studio: let Desktop start on Windows AMD when the Triton pairing fails - #18527
Merged
danielhanchen merged 2 commits intoNov 20, 2026
Merged
danielhanchen merged 2 commits into
danielhanchen merged 2 commits into
Conversation
On Windows ROCm, setup.ps1 sets the install manifest aside while it pairs triton-windows 3.8 with torch 2.11 / 2.12. When the pairing could not be verified but nothing was broken, setup warned, deleted the manifest and exited 0. Desktop reads a missing manifest as studio_install_incomplete, so the app would not start, and every repair (update, then installer) reached the same step and dropped the manifest again. The warning outcome now puts the manifest back. The fast path's Test-RocmTritonPairingNeedsPass already retries the pairing on the next update, so the manifest is not needed for that. A replacement that breaks a working triton still fails setup, and a manifest that cannot be put back now fails setup instead of being lost silently. Desktop repair also names the preflight reason when it ends not ready, instead of the generic "still not desktop-ready" message.
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. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Nov 20, 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
On Windows with an AMD GPU, Unsloth Desktop can get stuck in a state where it refuses to start Studio, and its built-in repair does not help. This was reported on Desktop 0.1.920-beta:
studio_install_incomplete).unsloth studio update, then the bundled installer. Both finished with exit code 0.Why it happens
Two pieces of code disagree about what a failed Triton swap means.
Desktop needs the install manifest. Setup writes
unsloth_install_manifest.jsoninto the venv when an install finishes. Desktop only starts Studio if this file is there. If it is missing, Desktop calls the install incomplete.On AMD, setup can delete the manifest and still report success. #16074 added a step that runs after the dependencies are installed. When ROCm torch 2.11 or 2.12 ends up next to Triton 3.9, this step replaces it with Triton 3.8, because 3.9 breaks fused flex attention decode with those torch versions. The step works like this:
Step 5 is the bug. Setup reports success, but Desktop now sees an incomplete install. Repair runs setup again, which reaches the same step, fails the same way, and deletes the manifest again. On a machine where the swap keeps failing, Desktop never recovers.
The swap can fail for several reasons: the install fails, the check after it fails or times out, or a uv
override-dependenciessetting keeps 3.9 while the install still exits 0. The report does not show which one the reporter hit.Desktop also hid the reason. Its check after repair returned only yes or no, so the error message never said why the install was not ready.
Fix
studio/setup.ps1: when the swap ends with only a warning, put the manifest back instead of deleting it.This is safe because a warning means Triton is no worse than before the step:
torch.compileturned off, as it already did (gate_torch_compile_on_windows).In both cases Studio can still start. The swap is also retried on the next update, even with the manifest in place, because the update's fast path checks the installed Triton directly (
Test-RocmTritonPairingNeedsPass). The old code comment said the manifest had to go so that the next update would retry; that is not needed.Setup still fails, as before, when the swap breaks a Triton that worked. It now also fails if it cannot put the manifest back, instead of reporting success without one.
Desktop (
studio/src-tauri): when repair ends with the install still not ready, the error names the reason, for example:The log line written when repair falls back from the update to the installer includes the reason too.
Tests (
tests/studio/test_rocm_triton_windows_pairing.ps1): cases where the swap only warns now expect the manifest to be kept. A new case checks that setup fails when the manifest cannot be put back.Testing
Live A/B on Windows AMD hardware
Both versions ran on AMD Strix Halo machines (Windows 11, Radeon 8060S, Python 3.13, torch
2.11.0+rocm7.14.0). "Main" is the base commit and "fix" is the same commit plus this change.To make the swap fail on purpose, a uv config set
override-dependencies = ["triton-windows==3.9.0.post30"]. With that in place, installing Triton 3.8 exits 0 but leaves 3.9 installed.Each version ran three commands. After each one, the table shows whether the manifest exists and what
unsloth studio desktop-capabilities --jsonreports forstudio_install_ok. That value is what Desktop checks before it starts Studio. Every command exited 0.install.ps1 --local --python 3.13, swap forced to failfalsetrueunsloth studio update(the update Desktop's repair runs), swap still forced to failfalsetrueunsloth studio update --local, override removedtruetrueRows 1 and 2 reproduce the reported failure on main and show the fix. Row 3 shows that both versions install Triton 3.8 once the cause is gone.
Logs: main, fix. The "Evidence after ..." steps print what the table is based on: exit code, the swap messages from the setup log, whether the manifest exists, the torch and Triton versions, and the
desktop-capabilitiesanswer. Harness: workflow, evidence script.The main job's last step (Verdict) is red because of a harness problem unrelated to the results above. That job also tried to run the updated unit tests against main, but the test file was not swapped in, so it ran main's own tests. The likely cause is that the runner checked out the patch with CRLF line endings. The unit comparison was rerun separately, below.
Unit tests
MATCH.cargo testinstudio/src-taurion Linux: 872 of 872 pass, including two new tests for the repair error. In one of three full runs, an unrelated timing-sensitive test (shell_path::tests::a_job_writing_nonstop_does_not_hold_launch) failed once and then passed on its own.Not tested
I did not run the Desktop app itself on Windows. The live test checks the same
desktop-capabilitiesanswer that Desktop reads before it starts Studio.Desktop before / after
Unsloth Desktop debug build (Linux, WebDriver journey), merge base 91211c7 vs PR head 904e9bb: all 10 Desktop steps pass on both sides. The startup screen is identical apart from the spinner frame. The only text this PR changes in Desktop is the repair failure message, which now ends with the reason, for example
(studio_install_incomplete). That message only appears after a failed repair, and the exact text is checked bya_repair_that_ends_not_ready_names_the_reason.Real gfx1151 Windows 11 (Windows PowerShell 5.1) re-check on the merged commit: the pairing tests fail 8 checks on the parent and pass 78 of 78 on the merge commit.