Repository navigation
Converter: the delivered preset-FG map, storage order and offset axes - #177
Merged
Merged
Conversation
… order and offset axes The spec side's map v1 replaces the synthetic stand-in layout: 67 block sources (A01..A17, B01w/B01b..B25w/B25b), 42 stages, weights as stored. Two map features it needs: channel_order "storage" (preset FG, map version 1 only) and axes by explicit offsets (map versions 1 and 4; range-checked at load, malformed forms damaged), used for net1's bias copy 0. The map's SHA-256 is pinned (converter tests and clean/fg/tests/test_fg_map.py), its sources and stages are checked against clean/fg/layout.py, and the synthetic end-to-end case now converts our own blobs in exactly its layout. Refs #96 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 14, 2026 16:50
This was referenced Nov 14, 2026
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.
Adds the spec side's frame-generation converter map. It replaces the synthetic stand-in layout from #148 (lane h).
Map:
data/fg.v1.map.json"preset": "FG", with 67 block sources (A01..A17for net1,B01w/B01b..B25w/B25bfor net2) and 42 stages (dl1.l01..dl2.l25), in upload order.FG_MAP_SHA256) and inclean/fg/tests/test_fg_map.py, which also checks every source and stage againstclean/fg/layout.py. They match exactly: the blob lengths, net1's weight spans, the skipped zero area and copy 0 of each bias group.Converter: two map features this map uses
"channel_order": "storage": the weight tensors (W_storage) are the stored spans, 1-D, not yet in natural axes. It is accepted only in a version-1 map of preset FG; every other preset still needs"natural".{"offsets": [...]}, with one entry per index in place ofstride/perm, in map versions 1 and 4. The net1 biases use it.strideorpermis "converter data damaged" (exit 20). An offset past the source is "does not fit" (exit 21).offsetsis damaged.Tests
test_fg_real_map: the digest pin, the header, the sources and stages against the layout, and the map validating. A file without the blobs gives FG's message (exit 12); a file smaller than the key's blob gives exit 11.test_fgnow uses the delivered map's exact layout, filled with our own random blobs (cases.fg_case). The previous checks are kept: shuffled, aligned, even and odd placements, a decoy, the NaN-guarded zero areas and bias copies,--preset FG, and missing blobs giving exit 12 or 13.storagein a preset-M map is damaged.Refs #96
Tested
clean/fgunit tests (including the newtest_fg_map) and the line-ending check pass. The public gates pass, with no hits in the changed files.Not tested