Repository navigation
l_frame_check: byte identity on raw defined bytes, per-run sentinels, missing outputs fail - #165
Merged
Merged
Conversation
… missing outputs fail The frame check's "byte for byte" comparisons (HIP default against the six-launch bottleneck, D3D12 against HIP, D3D12 default against the run with the fusions off) compared decoded values (the reduced history's bits 30-31 and the history's 4th FP16 dropped), skipped an output that was all zero on D3D12 as "not written" and used no sentinels (review of #162, finding 1). - Every output (RAW_OUTPUTS) is recorded as its raw defined bytes (the sizes wg_rt_buffer reports; the pack12 images at their own sizes; the display image without its row padding, which no kernel writes) and compared byte for byte (raw_compare). - Before every frame each run fills the outputs with its own sentinel (HIP stages 0xC3, HIP default 0xA5, D3D12 stages 0x3C, D3D12 default 0x5A), except the buffers the next frame reads before writing them. A missing output, one of another size or any differing byte fails the frame; outputs a configuration does not write by design are listed per comparison with the reason, and must still hold that run's sentinel. - Record-level negative controls on every comparison: one history write (the 4th FP16 of one pixel), one reduced write (bits 30-31 of one word), a whole reduced write dropped, an output missing; each must fail the comparison. - Model M's pack12 images are rearranged into the base layout's bytes for the comparison with HIP's base-format run. - runtime: wg_rt_fill (diagnostics: a named buffer's allocation set to a byte, also before the first frame); pipeline.py: Pipeline.fill and Pipeline.raw. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 14, 2026 12:02
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…nels, raw defined bytes, negative controls Each run fills its outputs with its own sentinel before every frame and records every output's raw defined bytes; both raw comparisons (against HIP, defaults against stages) fail on a missing output, another size or any differing byte, and carry l_frame_check's record-level negative controls. Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
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.
The fix for finding 1 of the #162 review:
clean/l/runner/l_frame_check.py's "byte for byte" comparisons now compare raw defined bytes, with sentinels.Before, they did not prove byte identity:
pipeline.py's decode drops the reduced history's bits 30-31 and the history's 4thFP16.
What changes
clean/l/runner/l_frame_check.pyRAW_OUTPUTS, 28) is recorded as its raw defined bytes: the sizeswg_rt_bufferreports; thepack12 images at their own sizes; the display image without its row padding, which no kernel writes. These are
compared byte for byte (
raw_compare) in all three comparisons: HIP default against the six-launch bottleneck,D3D12 against HIP, and D3D12 default against the run with the fusions off.
stages 0x3C, D3D12 default 0x5A. The buffers the next frame reads before it writes them are left alone: the reduced
history, the exposure pair, and the last frame's history, latent and motion surface.
must still hold that run's sentinel. They are: b0 ... b4 under the bottleneck megakernel; enc1's merged map under
fusion pm; Model M's dec2 / dec1 maps, which its fused decoder reads on chip; the display image of the fused pack12
post; and on the first frame, the previous frame's state.
clean/runtime/runtime.cpp,wg_runtime.h:wg_rt_fill, a diagnostics call that sets a named buffer's allocationto a byte; it also works before the first frame. The runtime keeps each allocation's size for it.
clean/runner/pipeline.py:Pipeline.fill,Pipeline.raw.Refs #89
Re-run on main (9a42f4b; synthetic models,
l_frame_check.py --runHIP, D3D12, D3D12 stages, then--compareand--compare-d3d12; recordsrecords/framecheck-raw-hip.jsonandrecords/framecheck-raw-d3d12.jsonin the rr-pluginbuild folder)
of 11. All negative controls caught.
negative controls caught.
both runs' sentinels: written by no kernel). The image's own bytes are identical; the padding is now outside the
defined bytes.
l_post=own, Model L's own reconstruction on the D3D12 frame (runtime option l_post=own) #162), on a local merge of Model L's own reconstruction on the D3D12 frame (runtime option l_post=own) #162's branch with this one (recordrecords/framecheck-raw-l-own-post.json):Note for #162:
compare_backendsnow returns raw results, withoutunwritten_d3d12.l_d3d12_own_post_check.pyneedsfill_sentinels/raw_outputsin its run, andraw_compare/negative_controlsin its compare (the run above did exactly that).
Tested
clean/l/runtime/tests/test_l_runtime_frame.py(18 tests); public gates.Not tested