fix(strategy): stream K tiles in multiply_exact for memmap inputs#112
Closed
RealDiligent wants to merge 1 commit into
Closed
fix(strategy): stream K tiles in multiply_exact for memmap inputs#112RealDiligent wants to merge 1 commit into
RealDiligent wants to merge 1 commit into
Conversation
Contributor
|
Gate chain passed. This PR is queued for the next batched GPU evaluation window. |
…mpare Co-authored-by: Cursor <cursoragent@cursor.com>
zeokin
requested changes
Jul 9, 2026
zeokin
left a comment
Owner
There was a problem hiding this comment.
This addresses a plausible out-of-core problem, but the current patch rewrites multiply_exact() globally and changes exact-baseline implementation/timing behavior for all inputs. That is too broad for a normal fix PR because exact baseline behavior is part of the evaluation surface. Please narrow this to the memmap/out-of-core case only, or move it to a maintainer-controlled baseline change with explicit benchmark/evaluator review.
Contributor
|
Commit history contains a Co-authored-by footer for a coding agent (for example Cursor, Codex, Claude, Copilot, or similar). CCO does not accept coding-agent co-author footers. |
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.
Summary
Fixes a critical out-of-core stability bug in the strategy exact baseline:
multiply_exact()uploaded the entireBmatrix to GPU memory while only streamingArow-blocks. Rebased onto currentmainafter upstream repo restructuring (supersedes closed PR #76).strategy/runner.compare()andeval/evaluator.evaluate()callmultiply_exact()as the exact reference. For disk-backed memmaps (--storage disk/storage=autowith limited host RAM),backend.to_device(np.asarray(B))materialised all ofBon-device and often OOM'd on realistic hardware. This fix k-tilesBalongside row-blockedA, mirroring the streaming model used bymatmul/gemm._gemm_tiled_sync.Result
Regime measured: Engine correctness verified by CPU-safe unit tests + GPU tests when CUDA/MPS available. No strategy cost claim.
Raw scorecard (paste
python -m eval …output or--json)Checklist
state honestly which axis it trades — see the one rule in CONTRIBUTING.md.
This PR restores out-of-core correctness; it is not a strategy cost submission.
python eval/tests/test_eval.py,python strategy/tests/test_subspace.py,python tests/test_correctness.py.<----ia--------e------- relabel refresh: 2026-07-07T14:23:28Z -->