[Engine] 0.2.22 (gfx1100): gr_write_norm_rs still misses the reference on the scalar fallback (ed5bff88c's own new parity test)
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
- 领域
- backend, performance
调研方向
Start with engine/src/prefill/kernels.cu and the failing parity test, engine/tests/hip/prefill_gr_write_norm_parity.cpp. Compare the scalar fallback in gr_write_norm_rs_kernel with the gr_write_kernel plus gr_norm_rs_kernel reference composition for odd strides (ldx = D + 1) on gfx1100. Rebuild and run ctest -R hip_prefill_gr_write_norm_parity; done means all configurations match bitwise.
由索引模型根据 Issue 内容生成。
描述
Area: [Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?: Source (START-HERE.bat, setup.sh or a build)
What happened: see the fenced result below — the named kernel/test mismatch, with the isolation details in the body.
Smallest steps or command that reproduce it: see the fenced block below.
Reproduction status: reproduces on a pristine checkout at the named tag on gfx1100; not fork-specific.
Strata version: 0.2.22 (b28ca95e3)
Graphics card, memory and system: AMD RX 7900 XTX (gfx1100, Navi 31, 24 GiB); Fedora 45, kernel 7.3.4; vendored ROCm SDK 10.2.0a (HIP 7.17.26392, amdclang 24.0.0git)
Hi — we maintain a small gfx1100 replay fork (xyzzing/Strata) and re-play our carried commits onto every upstream tag; the parity pregate in that routine is how this surfaced. Reporting because it is your own new test failing on your own new kernel, in the configurations the test itself added for coverage.
Problem and result
At the v0.2.22 tag (b28ca95e3, engine 0.1.69), on gfx1100 (RX 7900 XTX, ROCm 10.2.0a SDK, amdclang++ 24.0.0git, -O3 --offload-arch=gfx1100, no fast-math), the new test from ed5bff88c fails:
$ ctest -R hip_prefill_gr_write_norm_parity --output-on-failure
T=1 ldx=10240 lo=0 f16=0 identical
T=7 ldx=10240 lo=1 f16=0 identical
T=64 ldx=10240 lo=0 f16=1 identical
T=1000 ldx=10240 lo=1 f16=1 identical
T=4097 ldx=10240 lo=0 f16=0 identical
T=4097 ldx=10304 lo=1 f16=0 identical
MISMATCH rs T=257 ldx=10241 lo=0 f16=0: 18 of 1028 words differ, first at 24
MISMATCH xn16 T=257 ldx=10241 lo=0 f16=0: 1 of 2631936 words differ, first at 1104353
MISMATCH rs T=257 ldx=10241 lo=1 f16=1: 16 of 1028 words differ, first at 84
MISMATCH xn16 T=257 ldx=10241 lo=1 f16=1: 1 of 2631936 words differ, first at 969457
MISMATCH xn16_lo T=257 ldx=10241 lo=1 f16=1: 1176 of 2631936 words differ, first at 215181
RESULT: DIFFERS (1212 words)
- All aligned configurations pass bit-exact, including the production-shaped padded stride (
ldx = D + 64): the #6776 vector-path fix works there, on this card too. - Only the odd-stride configurations fail (
ldx = D + 1). The commit message reports "with the fix, 0" — we cannot reproduce that on gfx1100 for theD+1rows.
What the failing rows take
With ldx = 10241, xo = t * ldx + c * N is 4-word aligned only for t ≡ 0 (mod 4) (N = 2560), so ~75% of tokens take the scalar fallback in gr_write_norm_rs_kernel, not the vector path. 18 of 1028 rs values differ — sparse, last-bit class, not a whole-path signature. We checked the scalar fallback against the reference composition (gr_write_kernel + gr_norm_rs_kernel, both launched with 256 threads) line by line: same fmaf(bo, sc, r) expression, same d = threadIdx.x + 256k reduction order, same block_sum, no fast-math to allow reassociation — and could not find a source-level divergence. We are reporting the empirical signature rather than a root cause; the false-positive candidates we falsified (stale reference, contract change, fork interference, loader) are listed below.
Isolation
- Our replay fork's delta on the failing compilation unit is empty:
engine/src/prefill/kernels.cu,prefill.cppandengine/tests/hip/prefill_gr_write_norm_parity.cppare upstream-verbatim at our tip, and the fork's cmake delta is link-graph only. Pristine v0.2.22 fails identically by construction. - Production is not reachable: the engine's token stride is
DorD + XN_PADwithXN_PAD = 64(src/prefill/prefill.cpp:1008,:5102), both keep every row on the (now bit-exact) vector path. So this is coverage-only on our side — we carry it with a declared exception in our gate rather than a revert, since reverting would resurrect the 1-in-5 rs defect on production rows that #6776 fixed. - Falsified: not the test's reference (it is gr_write + gr_norm_rs as two launches, bitwise, and the aligned cases against the same reference pass); not the fork (empty delta, above); not the loader/environment (other HIP parity binaries on the same card pass; the same binary passes 6 of 8 configurations); not a tolerance question (the test is bitwise by design and we changed nothing).
Ask
If you can reproduce ldx = D+1 on an RDNA3 card (or have a hypothesis for what the scalar fallback reads differently from the two-kernel composition — we compared it against gr_norm_rs_kernel's loop statement by statement), we are glad to run diagnostics. Even a confirmation that the "with the fix, 0" claim was measured on aligned shapes only would sharpen the issue.
Environment: Fedora 45, kernel 7.3.4, gfx1100 (Navi 31), vendored ROCm SDK 10.2.0a (HIP 7.17.26392, amdclang 24.0.0git), build flags -O3 --offload-arch=gfx1100 (Release, no fast-math, project defaults).
- 主要语言
- C++
- 星标
- 11.6k
- 派生
- 1k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Niko1221/Strata 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
Niko1221/Strata#7365 · 2 条评论 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 4 天内回复
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chip未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 4 天内回复
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)未关闭
难度 2/5 1-3 小时 新手友好度 72/100
Niko1221/Strata#7276 · 1 条评论 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
Niko1221/Strata#7230 · 1 条评论 ·
维护者通常 4 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs first未关闭
难度 2/5 1-3 小时 新手友好度 72/100
Quantinuum/tket#2282 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
维护者通常 10 天内回复
-
Server crashes when a mob dies to poison可能已有人在做 @joelstiller 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
DarkCastleMUD/DarkCastle#305 ·
维护者通常 1 天内回复
-
[Issue]: RAS status report lists the wrong pids for an outlier node可能已有人在做 @bhargavchintam 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 2 天内回复