[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.
|
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