compute pack: a startup capture of 2689 compute requests exceeds the 256 MiB pack limit; 28 requests are left out #3475
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3475
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lukaslw-lab on GitHub · 2026-11-29 16:27 UTC · original
compile_dxil --prepare-compute-packwrites onecompute-<entry>.packof at most 256 MiB. The writer stops adding records at(256 << 20) - 128bytes (src/direct_compute_cache.cpp:410), and the reader accepts only files up to 256 MiB (lookup,:208).invalid compute pack size)maincf0c30afwith the parallel preparation from #3474 (--jobs 1gives the same bytes). The same requests on an oldermaingave 266.7 MB with nothing left out: frontend records grow as more programs translate, so longer runs will lose more.compute-<entry>.<n>.pack), each under the limit, and load all of them. Or raise both limits together and bump the pack version. Test: a request set over the limit must publish every record.@Not-Saii on GitHub · 2026-11-29 17:05 UTC · original
@lukaslw-lab, unless you're already on this after #3474, I'd like to take it. If you are, say so and I'll leave it.
Approach: numbered parts. I'd go with your first option and not raise the limit:
lookupinsrc/direct_compute_cache.cppreads every cache file into one buffer and enforces the 256 MiB cap for all of them. Raising it for the pack raises it everywhere.ReadFile.Plan.
Writer (
build_compute_frontend_pack): when the next record would cross the limit, it closes the current part and starts a new one. Parts are written in the sorted request order:compute-<entry>.pack;compute-<entry>.<n>.pack;Only a single record over the limit still fails with
invalid compute pack size.Reader (
ComputeFrontendPack::load): loads every part named by the count into the one record map. It refuses the pack, like any damaged pack today, if any of these happens:Version: bump
pack_version, so a single-file pack from before is rebuilt instead of being misread.Tests: pass the part limit to the writer as an internal parameter, so a test can cross it with a few small source-built requests instead of 256 MiB of them.
A set over the limit publishes every record across parts.
lookupreturns the same result for each key as a pack built with no limit.Negative controls:
Each must be refused, or rebuilt, without a crash.
Revert control: with the writer change reverted, the oversized set leaves records out again.
Measurement: counts only. If one of my own captures goes over the limit, I'll report prepared / unsupported / left out before and after, and the part sizes. If none does, the synthetic test is the evidence, and a rerun of your 2,689-request set would be welcome.
Environment: Windows 11 build 26300, MSVC (VS 2022, dev preset), Windows SDK 10.0.26100, Python 3.12. No GPU needed.
AI-assisted.