Repository navigation
Runtime: model.wgcm loading for Model L (the preset-L map's names) - #114
Merged
Merged
Conversation
…loader load_wgcm_stages checks a model.wgcm against a map for a given stage list (load_wgcm_model is Model M's list through it, unchanged); wgrt::l::load_wgcm_model uses Model L's list, which is the preset-L map's stages, names and shapes. synthetic_model.write_wgcm takes another model's stage order (Model M's output unchanged). Refs #89 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 runtime can load Model L's model.wgcm, the converter's output with the preset-L map. The map is the source of
truth for Model L's names: the runtime's tensor list (#112) is the map's stages, names and shapes, so no translation is
needed. Nothing changes for Model M.
#112 has merged; this branch now holds only its own commit (plus a merge of main).
What changes
clean/runtime/model.h/.cpp: newload_wgcm_stages(path, map_path, stages, out, err, other_map)with all ofload_wgcm_model's checks (whole-file hash, header, every stage's keyed digest against the map's list, names,types, shapes, values, the optional group). It applies them to a given stage list.
load_wgcm_modelis Model M'slist through it.
clean/l/runtime/l_model.h/.cpp:wgrt::l::load_wgcm_model(path, map_path, ...)with Model L's list.clean/runner/synthetic_model.py:write_wgcm(..., order=None). Another model's stage order is used for the fileand its synthetic map (test aid). Without it, the output is unchanged.
clean/l/runtime/tests/:l_load_dump wgcmand two tests intest_l_runtime_load.py.The runtime frame for Model L (#111) uses this loader when it is rebased on the confirmed layout.
Refs #89
Tested
test_l_runtime_load.py: 7 tests, OK (clang++):the same tensors from the raw layout;
or type"); a synthetic Model L file checked against the shipped
data/preset-L.v1.map.json("converted with adifferent map": the shipped map's digests are checked).
synthetic_model.write_wgcmfor four Model M sets (plain, output taps, filter variant 0 of 3, version-1 map):model.wgcm and map SHA-256 identical before and after;
clean.tests.test_model_filter(the wgcm loader's tests),test_model_select,clean.k.tests.test_k_runtime_tables,clean/rr_f/runtime/tests/test_model_bounds.py: OK.Not tested