Repository navigation
[CoreAI] Record file sizes and bundle digests in the delegate manifest - #23316
Merged
Merged
Conversation
Summary: List every delivered file with its byte size, and a SHA-256 digest per bundle, in the delegate manifest for both inline and sidecar delivery, so a runtime can check the payloads it reads and key its cache on bundle contents. The digest covers a fixed prefix, the file count, and each file's path, size and bytes in UTF-8 path order. `files` changes from a list of paths (inline only) to a map of path to size. Test Plan: ``` python -m pytest backends/apple/coreai ``` 126 passed (coreai-core 1.0.0b3, coreai-torch 0.4.3).
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23316
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 57d9517 with merge base 273ecf9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
SS-JIA
approved these changes
Oct 1, 2026
This branch was successfully deployed
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 Core AI runtime checks the payloads it reads against the manifest and keys its asset cache on bundle contents. This PR records both in the delegate manifest.
compiler/preprocess.py): the new_asset_metadatawalks the staged bundles (model.aimodelormodel.<arch>.aimodelc) and returns:files: each file's path relative to the asset root, mapped to its byte size. This replaces the previous inline-only list of paths.bundle_digests: one SHA-256 per bundle, over a fixed prefix, the file count, and each file's path length, path, size and bytes in UTF-8 path order._delivermerges this metadata into the manifest before choosing a delivery, so every delivery reports identical metadata.test_preprocess.py):AssetMetadataTestchecks thatfilesexactly covers the delivered files and sizes, with one digest per bundle, for source and AOT..ptefor a compiled filename, which now appears in the manifest by design. Itsnamed_data_store_output is Nonecheck still covers "contents not embedded".Test plan:
python -m pytest backends/apple/coreaigives 125 passed (coreai-core 1.0.0b3, coreai-torch 0.4.3).