Repository navigation
Model L reference: confirmed encoder and decoder arithmetic (FP16 block maps, block borders, L's per-pixel functions) - #113
Merged
Conversation
…d, planned kernels marked); C = 32 GPU check on the current packer API Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
…ut FP16, Model L's 13 value positions) Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…ncoder and decoder (FORMATS.md interface) Builds with WG_MODEL_L (clean/l/runtime compiled in) accept model=L: raw tensors from <model_dir>/L (the preset-L map's stages), Model M's ten Swin stages packed as before, Model L's blobs from wgrt::l::pack_model, code objects l_enc_values.co (tag lev), l_ops.co, l_swin.co. Step 2: the values into the halo map, the two per-pixel linears (FP8, then FP16), the encoder block, the gather projection into enc0's features. Step 4: the decoder projection, the decoder block (FP16 out), l_coef into Model M's coefficient buffers. Kernel names, arguments, grids and maps as clean/l/FORMATS.md (#113). Model L runs without pack12 (l_coef writes the base format); the fused dec1 + dec0, recon=output, motion_outres=original, enc0 variants and backends 1 to 3 are refused for it. Without WG_MODEL_L nothing changes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
…s, border and coefficient variant in the C++ Launch, compared field by field with the Python list; M's 17-value list renamed, L's 13-value sequence asserted 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:30
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…ncoder and decoder (FORMATS.md interface) Builds with WG_MODEL_L (clean/l/runtime compiled in) accept model=L. Model data: only the converter's model.wgcm in <model_dir>/L, checked against the preset-L map (l::load_wgcm_model); raw tensors are refused. Model M's ten Swin stages packed as before, Model L's blobs from wgrt::l::pack_model, code objects l_enc_values.co (tag lev), l_ops.co, l_swin.co. Step 2: values into the halo map, the two per-pixel linears, the encoder block, the gather projection. Step 4: the decoder projection, the decoder block, l_coef. Kernel names, arguments, grids and maps as clean/l/FORMATS.md (#113). No pack12 for Model L; the fused dec1 + dec0, recon=output, motion_outres=original, enc0 variants and backends 1 to 3 are refused. Without WG_MODEL_L nothing changes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…ncoder and decoder (FORMATS.md interface) Builds with WG_MODEL_L (clean/l/runtime compiled in) accept model=L. Model data: only the converter's model.wgcm in <model_dir>/L, checked against the preset-L map (l::load_wgcm_model); raw tensors are refused. Model M's ten Swin stages packed as before, Model L's blobs from wgrt::l::pack_model, code objects l_enc_values.co (tag lev), l_ops.co, l_swin.co. Step 2: values into the halo map, the two per-pixel linears, the encoder block, the gather projection. Step 4: the decoder projection, the decoder block, l_coef. Kernel names, arguments, grids and maps as clean/l/FORMATS.md (#113). No pack12 for Model L; the fused dec1 + dec0, recon=output, motion_outres=original, enc0 variants and backends 1 to 3 are refused. Without WG_MODEL_L nothing changes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…ncoder and decoder (FORMATS.md interface) Builds with WG_MODEL_L (clean/l/runtime compiled in) accept model=L. Model data: only the converter's model.wgcm in <model_dir>/L, checked against the preset-L map (l::load_wgcm_model); raw tensors are refused. Model M's ten Swin stages packed as before, Model L's blobs from wgrt::l::pack_model, code objects l_enc_values.co (tag lev), l_ops.co, l_swin.co. Step 2: values into the halo map, the two per-pixel linears, the encoder block, the gather projection. Step 4: the decoder projection, the decoder block, l_coef. Kernel names, arguments, grids and maps as clean/l/FORMATS.md (#113). No pack12 for Model L; the fused dec1 + dec0, recon=output, motion_outres=original, enc0 variants and backends 1 to 3 are refused. Without WG_MODEL_L nothing changes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…ncoder and decoder (FORMATS.md interface) Builds with WG_MODEL_L (clean/l/runtime compiled in) accept model=L. Model data: only the converter's model.wgcm in <model_dir>/L, checked against the preset-L map (l::load_wgcm_model); raw tensors are refused. Model M's ten Swin stages packed as before, Model L's blobs from wgrt::l::pack_model, code objects l_enc_values.co (tag lev), l_ops.co, l_swin.co. Step 2: values into the halo map, the two per-pixel linears, the encoder block, the gather projection. Step 4: the decoder projection, the decoder block, l_coef. Kernel names, arguments, grids and maps as clean/l/FORMATS.md (#113). No pack12 for Model L; the fused dec1 + dec0, recon=output, motion_outres=original, enc0 variants and backends 1 to 3 are refused. Without WG_MODEL_L nothing changes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
added a commit
that referenced
this pull request
Nov 14, 2026
…ncoder and decoder (FORMATS.md interface) Builds with WG_MODEL_L (clean/l/runtime compiled in) accept model=L. Model data: only the converter's model.wgcm in <model_dir>/L, checked against the preset-L map (l::load_wgcm_model); raw tensors are refused. Model M's ten Swin stages packed as before, Model L's blobs from wgrt::l::pack_model, code objects l_enc_values.co (tag lev), l_ops.co, l_swin.co. Step 2: values into the halo map, the two per-pixel linears, the encoder block, the gather projection. Step 4: the decoder projection, the decoder block, l_coef. Kernel names, arguments, grids and maps as clean/l/FORMATS.md (#113). No pack12 for Model L; the fused dec1 + dec0, recon=output, motion_outres=original, enc0 variants and backends 1 to 3 are refused. Without WG_MODEL_L nothing changes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
j0nsh1n
pushed a commit
to j0nsh1n/wronggpu
that referenced
this pull request
Nov 14, 2026
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.
Refs #89
The Model L CPU reference (structure table, NumPy oracle, packer launch lists) is updated to the confirmed
arithmetic of the input encoder and the coefficient decoder. The reconstruction is still open
(
PROVISIONALI7 and I8).Encoder
positions, with the new swin border "input". The chain samples the 20 values at the mirrored render position and
applies the dither at the unmirrored position. So the per-pixel maps carry a 2-pixel halo (
table.block_halo).Decoder
pixel-grid mirror.
dec_pixel "l"(oracle.coefficients_l):table.L_DEC_VALUES);dec_pixel "m"for the reductions to Model M.Table bookkeeping
PROVISIONAL.UNCONFIRMEDlist names one edge case the reference had to choose. For render sizes close to the padding,a mirrored halo position below 0 is clamped to 0.
Runtime packer (
clean/l/runtime/l_pack.cpp, merged in #103)positions. Its blobs are unchanged.
Packer launch lists (
l_pack)in_format/out_format(fp8 / fp16) per map,borderon swin launches, anddec_pixelon thecoefficient launch.
Tested
python -m unittest clean.l.runtime.tests.test_l_runtime_pack clean.l.runtime.tests.test_l_runtime_load: 8 tests pass (the C++ packer againstl_pack.py).python -m unittest discover -s clean/l/tests -t .: 30 tests pass (CPU, synthetic data). They include:Halo values come from the per-pixel chain at mirrored positions, with the unmirrored dither.
edge windows.
and reset.
dec_pixel "m", whole chain), unchanged.Not tested
borders, and the new per-pixel functions follow in their own PRs.