Repository navigation
Conversation
A bundle is a directory per (GPU product, torch, HIP or CUDA, Triton) key holding one uncompressed tar per cache (Inductor, Triton, MIOpen) and a manifest. Packing appends only new or changed files under a lock; unpacking extracts the bundle for this stack into the cache dirs a server here resolves and leaves a marker that each worker reads at startup to log the key and whether the bundle matches. mstar serve --compile-bundle unpacks before starting.
The runner hints dynamo that each static input's bucket-varying dim is dynamic (maybe_mark_dynamic, so a forward that needs a fixed size still compiles per bucket) and compiles under the platform's overrides for any count. Size 1 keeps a graph of its own. Each bucket is still captured separately. Meant for encoders over fixed-size windows, whose per-bucket Inductor compiles are most of a cold start.
MIOpen keeps each database in one file (find and perf DBs as key=value text, kernels in SQLite), so packing caches warmed separately replaced the bundle's records with the last host's. A changed database is now merged with the bundle's last copy, this host's record winning on the same key, and appended only when the merge adds something. MIOpen files are compared by content: two warm-ups can leave databases of the same size and mtime.
This was referenced Nov 1, 2026
This was referenced Nov 1, 2026
This branch has not been 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.
Stacked on #1095 (pr-29-s5-pinned-arena).
Why
A cold server on MI325X compiles for minutes: r9b takes 340 s on Qwen3.5 9B, 644 s on Whisper and 1032 s on Qwen3-Omni colocated with empty caches (one start each, one GPU, shared node). A restart on the same host is warm, but a new host or container pays all of it again, and there was no way to carry the Inductor, Triton and MIOpen caches over.
What changed
mstar/cli/cache.py,mstar/utils/compile_bundle.py:mstar cache key|dirs|pack|unpack|show. A bundle is keyed on product, torch, HIP or CUDA, and Triton, and holds one uncompressed tar per cache.packappends under a lock and merges MIOpen's databases.unpackrefuses another stack unless given--force, and exits 3 when the root has no match, so callers can serve cold.mstar/cli/main.py:mstar serve --compile-bundle ROOTunpacks before serving.mstar/worker/worker.py: each worker logs its stack key and whether the unpacked bundle matches.mstar/engine/accelerator_graph_config.py,accelerator_graph_runner.py: acompile_dynamiccapture option, one dynamic-batch graph for every bucket. Default off, and nothing here opts in.docs/compile_cache.rst,docs/serving.rst.Verification
test_compile_bundle.py,test_accelerator_graph_capture.py,test_platform_dispatch.py,test_torch_config.py90 passed, 4 skipped. On the speech stack's tip, the targeted set plus every branch's tests 2436 passed, 61 skipped, 0 failed, none failing only here. The widened 96-file set 1549 passed, 206 skipped, 5 failed, r9b 1519, 204, 5, the same 5 (ZMQ tests over the socket path limit under a long--basetemp, 15 passed with a short one)./health, MI325X, one start each, one GPU on a shared node, empty Inductor, Triton and MIOpen dirs, the speech stack's tip against r9b:Not in this PR
compile_dynamiccompiles 4x faster, but its replay cost is unsettled and it stays on a local branch.