mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #568] [CLOSED] parity tests: ple_parity runs without the missing fixtures, gr_parity and ple_parity wait for their setup #2694
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2694
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/568
Author: @gputier
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:pr/parity-tests-0.1.37📝 Commits (10+)
483953fMerge f-84 into rel-0.1.307e4ee54setup: the resident low-RAM variant keeps its RAM copy pageable on ROCm (STRATA_RESIDENT_PIN=0 in the config's env)1afdd47Merge f-coupled into rel-0.1.300704e7dHIP: enable RDNA4 gfx1201 (RX 9070 / AI PRO R9700)8616c60generate: the option parser's else-if chain in two statements (MSVC C1061: more than 128 nested blocks after the new options); the same order and effects538a0dfMerge f-resram into rel-0.1.30703ef30Merge f-189 (PR #189, the conversation snapshot core and RAM cache) into rel-0.1.30e46cccaConversation snapshots and checkpoints follow the session carve (#216): a session saves and restores only the layers it owns9907379HIP: RDNA4 gfx1201 beside gfx1100; the startup check compares the card with the compiled archs; setup picks ROCm and the hipBLASLt table per arch65e3df2CMake: the D-1 prompt-attention parity tool is CUDA-only; the HIP build with tests configures again📊 Changes
4 files changed (+342 additions, -373 deletions)
View changed files
📝
CMakeLists.txt(+4 -7)📝
include/strata/kernels/ple.hpp(+1 -1)📝
src/kernels/cuda/ple.cu(+2 -2)📝
src/kernels/ple_parity.cpp(+335 -363)📄 Description
Two test fixes on top of v0.1.37. Engine code is untouched.
ple_parity fails on every release
On v0.1.37,
ple_parityfails at every launch (200 out of 200, RTX 5090) with:Neither file is in any release or in any commit of the repository. Their generator,
ple_layer_xcheck.cpp, shows up only in comments, since the initial commitf2a08d4. It was never shipped.Commit 1: gr_parity, ple_parity wait for the default-stream setup
Several test sections prepare their data with
cudaMemcpyorcudaMemseton the legacy default stream, then launch kernels on acudaStreamNonBlockingstream without waiting. A non-blocking stream does not synchronize with the legacy stream, and acudaMemcpyfrom pageable memory can return before the DMA has landed, so the kernels may read data that is not there yet. The same pattern was fixed in the tests merged in 0.1.36.The commit adds a
cudaDeviceSynchronize()before the first launch at each affected site: 7 calls, 12 lines with their comments, ingr_parity.cpp(scalar section, multi section) andple_parity.cpp(history regression, native key stream). Nothing else changes.I could not reproduce the race.
gr_paritygave 0 failures out of 210 launches before the commit and 0 out of 210 after, on an RTX 5090. The fix rests on reading the code and on the CUDA stream semantics, not on a failing run.ple_paritycannot show it either, since it stops on the missing fixtures before reaching these sites.The same pattern may exist in three HIP tests. I read them but did not run or touch them:
tests/hip/ple_iq4.cpp:154-157tests/hip/prefill_mmq_parity.cpp:135-140and:252tests/hip/prefill_native_batch.cpp:56-59and:274Commit 2: ple_parity checks against a double-precision reference
The test now computes the PLE block in double precision, inside the test, from the real weights (Q2_0 pack
pack/full/dense.bin, offsets fromindex.txt, and the table rows from the GGUF). It compares each stage of the block with that reference, with a tolerance of 1e-5.--inand--outare gone, along withSTRATA_PLE_FIXTURE_DIR.This changes what the test proves. The original oracle was a capture of ggml's CPU graph. The new reference is arithmetic written in the test, so it checks that the kernel computes the arithmetic it announces, not that it matches ggml bit for bit or within ggml's own rounding. If you still have the generator or the two files, publishing them restores the ggml oracle, and the double reference can stay next to it.
The engine is unchanged:
ple.cuandple.hppchange in comments only, to stop pointing at the missing files.CMakeLists.txtchanges only theple_paritytest declaration and the comment above it.Measured on an RTX 5090, v0.1.37 with both commits:
ple_parity: 10 launches out of 10 pass, worst stage 1.148e-07 against the 1e-5 tolerance.silu_fin a copy fails 3 launches out of 3, with 6 failing stages (conv_outat 1.000e-02 andresultbetween 1.5e-04 and 1.8e-04, for each of the 3 tokens). The error was removed from the copy afterwards.Not run: the full ctest suite. The counter-test only breaks a kernel stage, not a weight of the pack.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.