Repository navigation
Runtime frame trace: launch arguments, allocations, sizes, resets, an injected failure - #119
Merged
Merged
Conversation
… an injected failure The recording device decodes the arguments of the encoder, decoder and block kernels (and Model L's, per clean/l/FORMATS.md): device addresses as allocation + offset, ints, the encoder / decoder parameters. Flags for per-frame render sizes, game resets, a failing launch, the model format and map. New checks for Model M: dataflow encoder -> enc1 and dec1 -> decoder, buffer extents, the history between frames, reset and parity, changing sizes, a failed launch stopping its frame. Nothing changes in the runtime. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
…nknown address in a decoded argument swin_block_c64_add_dec0* takes x, skip, w, H, W, ox, oy (not the blocks' common form): the generic entry read an int as an address. The tests now assert that no decoded argument is an unknown address (the shipping build runs the fused block). Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 14, 2026 01:37
phantoslayer21
force-pushed
the
model-l/frame-recorder
branch
from
November 14, 2026 01:43
699b1f9 to
35e8654
Compare
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 CPU frame trace (#108) now records what each launch is given, not only which kernel runs. This is the recorder the
review of #111 asks for (buffers, argument values, extents, reset, parity, failure, changing sizes), and the acceptance
list for the Model L frame on HIP and on D3D12 builds on it. Nothing changes in the runtime.
What changes (
clean/tests/)runtime_frame_trace.cpp:alloc b<k> <bytes>);b<k>+<offset>(or 0), ints, and the encoder / decoder parameters as
E{rw,rh,fw,fh,frame,reset}/D{rw,rh,fw,fh,reset}. Thetable covers Model M's
input_encoder,coef_decoderand Swin blocks, and Model L's kernels asclean/l/FORMATS.mdgives them;wg_rt_info(index, parity, effective reset, render size);--sizes=(render size per frame),--reset=(the game's reset),--fail=<kernel>@<frame>(that launchfails),
--format=/--map=(model.wgcm with its map);swin_block_c64_add_dec0*) has its own entry: x, skip, w, H, W, ox, oy.A first version read it with the blocks' common form; that showed up as unknown addresses that changed from run
to run. The tests now assert that no decoded argument is an unknown address (the shipping build runs the fused
block).
test_runtime_frame_trace.py: aTraceparser keeps the arguments (parse()still returns the old shape). Newchecks for Model M:
buffer is large enough for its map. dec1's H, W are the F/2 grid. The parameters carry the render size and the
padded grid. Two sizes: aligned 64 x 64 and non-aligned 80 x 48;
reads (the two buffers swap);
The effective reset is 1, 0, 1, 1, 0, 1 (first frame, the game's reset, two size changes) and reaches the
encoder's and decoder's parameters. The parity alternates. The size and grid are right in every frame;
error is reported, and frame 2 runs whole.
Refs #89
Tested
python -m unittest clean.tests.test_runtime_frame_trace: 7 tests, OK (clang++ and MSVC); again after the rebase onto main with Model L reference: confirmed encoder and decoder arithmetic (FP16 block maps, block borders, L's per-pixel functions) #113 (35e8654), OK.options) gives the same output in two runs (deterministic; no unknown address).
Not tested
--format=2path is exercised by the Model L frame tests (Model L runtime frame on the HIP backend (confirmed FORMATS.md interface) #111), not here.