[Engine] 0.2.22 (gfx1100): gr_write_norm_rs still misses the reference on the scalar fallback (ed5bff88c's own new parity test)

Abierto
#7,345 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 the D+1 rows.
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.cpp and engine/tests/hip/prefill_gr_write_norm_parity.cpp are 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 D or D + XN_PAD with XN_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).

Lenguaje dominante
C++
Estrellas
11.6k
Forks
1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Niko1221/Strata

Todos los issues de Niko1221/Strata

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.