Repository navigation
Conversation
1 task done
4 of 5 tasks
Contributor
Author
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.
What & why
The Python asset checker can report
passedfor GGUF files that the native loader rejects.general.alignmentis accepted as an INT32/UINT64/INT64 whenever its value is 32, although the native GGUF reader requires UINT32. An empty metadata array can also carry an unknown element type: no elements are read, so validation never reaches the unsupported-type check. The writer can produce the incorrectly typed alignment itself.Validate the encoded alignment type when reading and writing, and validate the array element type before reading its items. All supported empty-array types still round-trip. The change concerns GGUF metadata; it does not change catalog parsing or tensor payloads.
Area
edge0-infer/tools/assets/)How was it tested?
Base
f6bfa5546bcf89919f86946ec669bcc7f4cd526d; Linux, Python 3.12.14, GCC 14.2, CPU preset.uv run --project tools/assets --offline --no-sync pytest -q -p no:cacheprovider -m l1 tools/assets/tests— 121 passed, 6 deselected.libggml-base.acallsgguf_init_from_fileon the five malformed fixture files. It rejects all five, reporting the wrong alignment type or unknown array type, and accepts a valid UINT32-alignment/empty-string-array control. This confirms the native/Python mismatch with actual encoded files.ctest --preset cpu -L "L0|L1" --output-on-failure -j 4: 97 passed, 3 Vulkan tests skipped, 4 existing failures. The same base failures aremoe_test_app_generation(std::tmpfileunavailable here),moe_test_platform_memory(Linux expectation), and extreme-float serialization inmoe_test_ordered_json/moe_test_template_tools.git diff --checkpassed. No real checkpoint, GPU, or numerical inference validation was run; this change rejects malformed metadata before tensor execution.Checklist