Repository navigation
fix(gpu): stop the float_adm twins applying adm_csf_scale in Watson mode, and align its aliases with the CPU - #1373
Merged
Conversation
lusoris
added a commit
that referenced
this pull request
Sep 6, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 06:54
4c50030 to
da88e82
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 09:14
da88e82 to
f0658ff
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 09:17
f0658ff to
a023cac
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 10:18
a023cac to
9bc52d0
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 11:13
9bc52d0 to
db53586
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 13:15
db53586 to
3853091
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 16:38
3853091 to
c7c4990
Compare
lusoris
added a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 7, 2026 21:23
c7c4990 to
cb8d3f9
Compare
lusoris
added a commit
that referenced
this pull request
Sep 15, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 15, 2026 20:02
cb8d3f9 to
f4e76ba
Compare
14 of 16 tasks
Contributor
Author
|
Left out of the pre-rc.1 fixing train in #1425, deliberately, and it needs a decision. This PR and #1379 both refactored
Both are reasonable; neither is a superset. Merging the text produces a helper that is half of each, so this is a redesign of the test rather than a conflict resolution, and it is better done once against the merged train than twice against a moving one. Nothing else in this PR conflicts. Suggested path: after #1425 lands, rebase this branch and port the |
lusoris
added a commit
that referenced
this pull request
Sep 20, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 20, 2026 08:12
f4e76ba to
77dfa4f
Compare
lusoris
added a commit
that referenced
this pull request
Sep 20, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 20, 2026 08:37
77dfa4f to
8d879c4
Compare
lusoris
marked this pull request as ready for review
September 20, 2026 08:47
…the derived feature name Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…lias invariant Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…without 64ea351 stopped the float_adm twins applying adm_csf_scale in the Watson-97 mode and aligned their aliases with the CPU's scf / scfd, but it merged while this branch still held its ADR, its AGENTS invariant, its state row and its test. master therefore carries the fix with no record of the decision and nothing that would catch a regression. The three GPU float-ADM parity tests gain test_float_adm_csf_scale_is_a_watson_mode_noop: it sets adm_csf_scale=2.0 on both sides and asserts the twin still matches the CPU, which holds only while the twin ignores a Barten-mode argument in Watson mode. The derived key table follows ADR-1183 — alias base plus _<alias>_<%g value>, so _scf_2 — and each test reuses its own file's existing variant idiom rather than importing a fourth one. The branch's own versions of these three files are dropped in favour of master's: #1379 restructured them around per-variant key tables after this branch was cut, and that design already covers what the branch's suffix-derivation was for.
The row carried the 'PR #TBD' placeholder that ADR-0334's gate rejects: inserted state.md rows must name the merged PR or commit, because a row that cites nothing is what makes the register go stale.
lusoris
force-pushed
the
fix/float-adm-csf-scale-mode0-and-aliases
branch
from
September 20, 2026 09:46
9f0e994 to
3b207d4
Compare
This was referenced Sep 30, 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.
Summary
Two related drifts in the CUDA/SYCL/HIP/Metal
float_admtwins, found by the twin-drift sweep (ids 58–61, 67, 94–97) and confirmed against the source before any code was touched.Semantics (ADR-1214). The only CSF mode the twins support is
adm_csf_mode == 0(Watson-97). In that mode the CPU referenceadm_tools.c::adm_csf_rfactor_scomputesrfactor = 1 / dwt_quant_step(...)and never readsadm_csf_scale/adm_csf_diag_scale— they're arguments of the Barten branch (mode 1) only. All four twins multiplied them into every rfactor:The CUDA comment beside it claimed this "matches the CPU Watson-mode path" — the opposite of what
adm_tools.cdoes. Soadm_csf_scale=2.0doubled the GPU's CSF weights while the CPU ignored it.Naming. CUDA/SYCL/HIP aliased the options
cs/cdswithmax 100; the CPU (and Metal) usescf/scfd,max 50. ADR-1183 derives feature names from aliases, so one request producedadm2_scf_2on the CPU andadm2_cs_2on the GPU — two keys for one feature.Verified, Netflix 576x324 pair,
adm_csf_scale=2.0:adm2scf=2adm2_scf_2adm2_scf_2(wasadm2_cs_2)adm2_scf_2adm2_scf_2i.e. the option is now a no-op on the twins exactly as on the CPU, under the CPU's key.
Gates added: each backend's
float_admparity test gains a_csf_scalecase that setsadm_csf_scale=2.0, adm_csf_diag_scale=0.5and reads the scores back under the derived keyadm2_scfd_0.5_scf_2(options sorted by name,%gvalues) — so both the arithmetic and the naming are asserted. CUDA 2/2, SYCL 2/2, HIP 3/3 on RTX 4090 / Arc A380 / gfx1030.Type
fix— bug fixtest— test-only (new gates)sycl/cuda/simd— backend-specificChecklist
make format && make lintis green locally (pre-commit run --filesclean;check-state-md-rowsOK; ADR index in sync).meson test -C build— the touched targets on all three local backends, listed above./cross-backend-diffand the worst ULP is ≤ 2 — equivalent done directly: CPU vs each twin at the option value is identical to the default-path delta each twin already had..c/.h— no new source files.cs=/cds=now gets an unknown-option error; those aliases never matched the CPU, so no model that worked on both backends can be affected.docs/adr/_index_fragments/— in sync.Bug-status hygiene (ADR-0165)
docs/state.mdupdated —T-GPU-FLOAT-ADM-CSF-SCALE-WATSON-MODE-2026-09-07closed.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
## Alternatives consideredin ADR-1214 (including changing the CPU instead, dropping the options from the twins, and porting Barten).AGENTS.mdinvariant note — added tocore/src/feature/AGENTS.md.changelog.d/fixed/float-adm-csf-scale-watson-mode-and-aliases.md.docs/rebase-notes.md, "ADR-1214 — Watson-mode CSF rfactors and the float-ADM option aliases".Reproducer
On
masterthe CUDA line prints a different value than its default under the keyadm2_cs_2; on this branch it prints its default value underadm2_scf_2, matching the CPU's key.Known follow-ups
adm_p_normis accepted but hard-coded to 3 in the kernels, and thatadm_bypass_cm/adm_skip_scale0are advertised but not honoured (ids 98–104). Separate defects, separate PR.🤖 Generated with Claude Code
Rewritten 2026-09-20 — the code already merged; this is now the record and the test
The implementation is on
masteras64ea351be("fix(gpu): stop the float_adm twins applying adm_csf_scale in Watson mode, and align its aliases with the CPU") — this branch's own commit, landed through an earlier train. What it merged without is everything the same-PR rules ask for:masterbefore this PRcore/src/feature/AGENTS.mdinvariantdocs/state.mdrowSo
masterhas carried the fix with no decision record and nothing that would catch a regression. This PR closes that.The new test.
test_float_adm_csf_scale_is_a_watson_mode_noop, added to the CUDA, HIP and SYCL float-ADM parity tests: it setsadm_csf_scale=2.0on both sides and asserts the twin still matches the CPU — true only while the twin ignores a Barten-mode argument in the Watson-97 mode it implements. The derived key table follows ADR-1183 (alias base plus_<alias>_<%g value>, hence_scf_2).Verified against real gfx1036 kernels, not just compiled:
and under the default scaffold posture it skips with
[skip: HIP scaffold ENOSYS on feed], per ADR-1264.The conflict that deferred this PR is resolved by dropping this branch's test files. #1379 restructured the three parity tests around per-variant key tables after this branch was cut; the branch had restructured them around runtime suffix derivation. Those were two answers to the same question, and #1379's is on
master, somaster's files are taken whole and the new case is written in each file's own existing idiom rather than importing a fourth one. Nothing the branch's version tested is lost: itscsf_scalecase is the case added here.CPU build and
meson test --suite=fast: 140 of 140, zero warnings.praetorctl auditpasses, baseline 1414 → 1414.