[executorch][vulkan] Add payload-bounded constant sharding - #21404
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21404
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 6 Unrelated FailuresAs of commit d0e8ae3 with merge base 2439920 ( NEW FAILURE - The following job has failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
@claude Thoroughly review for redundancy or areas of modularization or any high value changes |
|
Claude finished @JCNTH's task in 1m 40s —— View job Review: payload-bounded Vulkan constant shardingThorough pass focused on redundancy, modularization, and high-value changes. Overall this is clean, well-tested (atomicity, idempotency, aliased-buffer-counted-once, order-independence are all covered), and the default path is genuinely untouched. Notes below, roughly in priority order. 1.
|
SS-JIA
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
41760ec
into
gh/JCNTH/194/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #21404 by @JCNTH ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/JCNTH/194/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/JCNTH/194/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/JCNTH/194/orig @diff-train-skip-merge cc @SS-JIA @manuelcandales @digantdesai @cbilgin --------- Co-authored-by: Julian Ng-Thow-Hing <juliannth@meta.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Julian Ng-Thow-Hing <107437036+JCNTH@users.noreply.github.com>
Stack from ghstack (oldest at bottom):
Enable deterministic payload-bounded Vulkan constant sharding
Problem
Large Vulkan exports can make inline PTE named data exceed downstream artifact limits, but
NamedDataStorecannot externalize that data into bounded groups.Solution
uint64raw-data cap externalizes constants after graph construction into deterministic shards.Implementation
NamedDataStore.externalize_pte_datagroups aliases by backing buffer, preserves existing tags, and rejects oversize buffers or collisions atomically.parse_compile_optionsandparse_compile_spectransportexternal_constants_max_data_bytesas a strict positiveuint64.VulkanBackend.preprocessapplies sharding only when the option is present.Constraints
The default path is unchanged; buffers are not copied or split. The cap bounds unique raw buffer bytes per external tag, not final
FlatTensorfile size including alignment and header overhead.Co-authored-with: Claude Code.
@exported-using-ghexport
Differential Revision: D113608555
Differential Revision: D113608555
cc @SS-JIA @manuelcandales @digantdesai @cbilgin