Repository navigation
[Reshard] Add property tests for the tiled COO read planner - #2
Conversation
State the README contracts of TiledCOOLayout and plan_tiled_coo_read as Hypothesis invariants over random layouts, target boxes and packed payloads, checked against an oracle that only knows global tile boxes. Signed-off-by: Rishabh Sinha <rsinha17@terpmail.umd.edu>
28ebaa0
into
zxpdemonio:cruz/coo-sparse-weight-transfer
|
Thank you, @rishabhsinha17. I independently reviewed and merged this contribution into the branch behind upstream kvcache-ai/Mooncake#3751, preserving your original commit ( Independent verification on the exact contributed commit:
The deselected test is unrelated to this contribution: the verification host has an older installed native Your property tests are a useful addition, especially the independent geometry oracle, placement/order invariance, directory/payload range checks, and empty-intersection coverage. On the coverage point raised in your upstream review: a Thanks again for the careful review and contribution. Further testing and discussion around the reshard path are very welcome. |
Description
Property suite for the tiled COO planner in kvcache-ai#3751, offered as commits onto that PR per the discussion in kvcache-ai#3747. The reshard tests already use Hypothesis in tests/test_reshard_geometry.py, so this adds one file next to test_tiled_coo.py and no new dependency.
Every test states one README contract as an invariant over random layouts, target boxes and packed payloads and checks it against an oracle that only knows global tile boxes. Covered contracts are canonical immutable layouts that round trip through to_dict, tile runs selecting only the tiles that meet each source/target overlap with a full-width row range planned as one run, directory windows that contain each endpoint once and bridge at most 64 unused entries, per-run payload slices equal to their source slices with maximal coalescing, boundary filtering restoring the coordinate oracle and being a no-op whenever the selected tiles all lie inside the target, one target reading the same entries alone or in any batch order, a partition of a record reading each entry once after filtering, and bind_offsets rejecting wrong lengths, negative, non-integer and non-monotone directories.
Suggested Merge Priority
Module
mooncake-reshard)Type of Change
How Has This Been Tested?
Test commands:
Test results:
Checklist
AI Assistance Disclosure
Claude Code wrote the strategies, the oracle and the test bodies from the README contracts, and every count above comes from a run on this branch.