Repository navigation
Update loss numbers for ROCm MI350 label. - #3078
Merged
tianyu-l merged 1 commit intoApr 24, 2026
Merged
Conversation
akashveramd
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
April 23, 2026 23:37
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
Collaborator
Author
|
@tianyu-l: There is a CPU failing test which is unrelated to ROCm. Rest all jobs are passing. Does this PR look good for merge? |
jithunnair-amd
approved these changes
Apr 24, 2026
Collaborator
There was a problem hiding this comment.
Changes seem in line with 95a2542, which updated the CUDA losses file in the same way.
tianyu-l
approved these changes
Apr 24, 2026
3 of 5 tasks
tianyu-l
pushed a commit
that referenced
this pull request
May 4, 2026
…osses (#3196) ## Summary Replaces the placeholder values in `tests/assets/losses/qwen3_moe_rocm_mi350x.txt` with values that the MI350 leg of `8 GPU Feature Tests` actually produces, fixing a hard regression on `main`. Intended as a **temporary unblock** — see verification caveats at the bottom. ## Failure on main Every `8 GPU Feature Tests` ROCm job on `main` since 2026-04-30 03:46 UTC has failed with: ``` AssertionError: 8.03601360321045 != 8.159435272216797 Loss mismatch at step 1: baseline=8.03601360321045, imported=8.159435272216797 ``` Failing run: https://github.com/pytorch/torchtitan/actions/runs/25197047879 ## Root cause PR #3081 added the qwen3 MoE invocation to `8 GPU Feature Tests` and committed `tests/assets/losses/qwen3_moe_rocm_mi350x.txt` with placeholder values rather than values from a real MI350 run. Its own description includes the TODO `Generate reference loss files on CI machines: # ROCm (8×MI350X): python3 scripts/loss_compare.py ...`. ## Provenance of the new values The new file is the `[LOSS_COMPARE] Actual baseline losses` block extracted from the failing CI log of run 25197047879 (sha `70340f4e`). Cross-checks: - **CI determinism:** also extracted the same block from run 25182832721 (sha `0138bde8`); 100/100 lines bit-identical to 25197047879. - **CUDA cross-check:** `qwen3_moe_cuda.txt` step 1 = `8.03599739074707`. New MI350 step 1 = `8.03601360321045`. Differ by ~2e-5, the magnitude of bf16 hardware-precision difference between CUDA and ROCm. - **Independent gfx950 rerun:** ran `scripts/loss_compare.py` baseline-only on a separate gfx950 box (MI355X, same CDNA4 arch as MI350X) in a fresh venv with the same `torch==2.13.0.dev20260428+rocm7.1` wheel CI uses. Step 1 + step 2 reproduce **bit-identically** (`8.03601360321045` and `7.309834957122803`). This rules out the placeholder hypothesis: the model+config genuinely converges to ~8.036 at step 1 on gfx950. ## Verification caveats — please have a second reviewer with proper MI350 access confirm The independent gfx950 rerun above matched bit-identically only at steps 1 and 2; at step 3 onward it drifted at the 5th–6th significant digit (e.g. step 100 differed by ~3e-4). Likely sources: the qwen3 invocation in CI does not pass `--debug.deterministic` / `--debug.seed=42`, and ROCm runtime env vars / hipBLASLt heuristic selection / host CPU layout differ between hosts. So: - This file is bit-identical to what *the CI runner* produces (verified twice across two SHAs), so CI will pass. - It is **not necessarily** what every gfx950 box anywhere will produce. The same fragility is documented for the dense `llama3_rocm_mi350x.txt` baseline (re-baselined every few weeks, most recently in #3078). - I do not have access to the actual CI MI350X runner to verify on the canonical hardware. **A reviewer with such access should re-run `scripts/loss_compare.py` baseline-only with `--baseline-module=qwen3 --baseline-config=qwen3_moe_debug --steps=100` and confirm the produced values match this file** before treating this as anything more than a temporary unblock to get `main` green. ## Scope - Touches **only** `tests/assets/losses/qwen3_moe_rocm_mi350x.txt` (100-line replacement). - The dense `llama3_rocm_mi350x.txt` baseline is untouched. - No workflow YAML, model code, or `qwen3_moe_debug` config changes. - A more durable fix — adding `--debug.deterministic` and `--debug.seed=42` to the qwen3 invocation in `integration_test_8gpu_features.yaml` to remove the cross-host fragility — is out of scope here and worth a separate discussion. ## Test plan - [x] Pre-commit clean on the modified file. - [x] File still 100 lines, format `<step> <loss>` unchanged, terminating newline preserved. - [x] Step 1 + step 2 bit-reproduced on independent gfx950 host. - [ ] `8 GPU Feature Tests` ROCm leg goes green on this PR. - [ ] Independent confirmation on canonical MI350X CI hardware (requested above).
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.
This PR updates the loss numbers for ROCm MI350 label as the numbers were found to be incorrect for this failing job https://github.com/pytorch/torchtitan/actions/runs/24852088864/job/72755031032. Although the loss numbers were already updated for MI350 label in this merged PR #2740.
If this issue is observed again, then @lizamd your team will need to look into it to find a better solution for this issue.
cc: @jithunnair-amd @tianyu-l