Repository navigation
Conversation
Decouple sequence IDs from physical storage columns so the batched-sequence cache can start with 2 physical columns and grow or shrink at runtime instead of always allocating max_seqs + 1 columns. - CudaKVPool gains resize_columns() with declared vs physical column counts, transactional replacement copies, and binding invalidation on column moves (mirroring grow()). - CudaBatchedSequenceCache tracks IDs and physical columns separately, uploads a 5-wide seq_info whose last field is the runtime pitch, and adds ensure_columns()/compact_columns() behind an inflight guard. - The lowering pass gains manifest version 2 with runtime_columns, the SDPA kernel reads the runtime pitch via INFO_WIDTH, and CudaExecutor reads get_offgraph_kv_sequence_info_abi (1 or 2) from the program. - ABI-1 behaviour is unchanged: the new paths are gated on CacheConfig::runtime_sequence_columns and manifest version 2. Tests: extended test_cuda_kv_cache and test_offgraph_kv_batched_sequence, plus an opt-in Muse-Glimmer runtime KV probe. The SDPA ring-scan logic from the experiment patch was intentionally not ported: main's ring handling is kept and only the runtime-pitch change is included. This is PR 1 of the runtime-columns series; per-owner capacities (ABI 3) build on the ID/column split introduced here.
- Revert the unrelated O0 -> O2 change in export_solo.py. - Recover a prepared-but-uncommitted ABI-2 step in the next prepare_step (fence all streams, then clear inflight_) instead of wedging the cache until clear() drops every sequence; add a regression test. - Grow physical columns geometrically and trim the allocator only on the compact path, avoiding one full KV copy per admission. - Reject runtime columns + DFlash in CudaExecutor and in the batched-sequence cache factory. - Gate the seq_clone fence/poison on runtime columns so ABI-1 clone failures are unchanged; refuse seq_rm for a declared sequence in both ABIs. - Fix the lintrunner CMake formatting failure and stale seq_info width comments. - Pool resize comment and lowering .get() redundancy left as-is: resize_columns is only called from ensure_columns, and the .get() keeps LowerOffGraphKVPass usable with manifests not built by the parser.
Merge upstream f63b372 without changing the runtime-columns feature delta. Integration verified with assistance from OpenAI Codex.
Abort prepared forwards independently of logging, qualify capture and replay through counters, and retain idle compaction headroom across bursts. Add release-path recovery, allocation-free trimming, and native burst regression coverage. Authored with OpenAI Codex assistance.
|
@claude /pr-review Please review this feature at head |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25422
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 1 Unclassified FailureAs of commit 785257e with merge base ec5937f ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Claude finished @Gasoonjia's task in 53m 45s —— View job PR Review: #25422Request Changes: at Detailed reviewSummaryThis PR adds opt-in ABI 3 (
Verdict: Request Changes. There is a correctness bug on the clone path, an abort contract that takes down every session, and a timing gate that is fragile as a PR check and does not measure ABI 3's new costs. The frozen descriptor ABI, manifest validation and Code Quality
Infrastructure
Testing
API Design
Performance
RecommendationRequest Changes. The clone NaN path (Code Quality), the abort scope (API Design) and the per-owner relayout cost must be addressed. Fix the gate's placement and coverage gaps before treating its 2% result as qualification. CI and validation status at the current head
|
|
@claude /pr-review Please review repaired head The repair addresses your clone/unwritten-slot, abort-scope, owner-relayout, restore-transfer, timing coverage and CMAKEFORMAT findings. It selects Ring source addresses before K/V loads, uses stable spans within a geometric arena, scopes failed forwards to their owners, and fences failed preparation before reuse. Tests include NaN-filled restored Ring history, 64 staggered admissions and graph transitions, failed late staging allocation with cross-stream retry, and failed preparation/compaction fence recovery. The native checker now uses four balanced rounds, times growth and restore separately, and has a material driver-release fixture; PR timing is report-only, not performance qualification. Host undo RAM is explicitly bounded and reported. An inherited owner-count automatic-idle heuristic remains documented as required allocator-policy work for PR3; current driver qualification covers explicit compaction. Local evidence: 29 production C++ tests pass with ASan/UBSan, 8 parser/manifest contract tests, 7 native-gate/workload tests, and 6 CI configuration tests pass; actual CUDA translation units pass host syntax/type checks. Formatting checks pass. CUDA cannot execute on this Mac, and this new head has no GPU qualification yet. The prior head's native job 136971041339 failed |
|
Claude finished @Gasoonjia's task —— review in progress Todo
|
|
@claude /pr-review Please complete a fresh code review and post a final code verdict for unchanged head Do not wait for still-running CI inside this review action. Review the code and tests, consolidate and fact-check findings, and post the completed findings/verdict now. List unfinished CI explicitly as pending validation. An approval of code with pending CI does not authorize the next stacked feature: I will keep PR3-5 gated until the necessary exact-head numerical/resource/memory/graph and performance evidence is complete. Do not dispatch or rerun CI. Current-head evidence: Linux CUDA runtime job136995887754 passed 91 KV-cache,16 Ring-history,13 private-row-layout tests, including late-allocation rollback fences, cross-stream retry, failed-fence clear recovery, staggered64-owner growth, resident clone/rewind and graph replay. Both quantized-GEMM jobs136995887902/136995887905 passed. Windows runtime jobs passed but their selected tests exclude the new private-KV tests, so do not claim those as ABI3 behavioral coverage. Lint passed. The Mac Buck job failed in Anaconda dependency metadata download (HTTP429), before tests. Native batching136995887681, system136995887915, kernel136995888004 and full-model E2E are still running as of2026-11-21T23:00UTC. No GPU performance qualification is claimed yet. Use the current base and all24 changed files for the review; do not infer approval from the earlier partial comment. This is stack2/5 on qualified #25324 plus upstream main. Existing ABI1/2 are defaults. The experimental ABI3's host-RAM budget and explicit-compaction behavior are documented, with byte-aware automatic idle reclamation retained as required PR3 scope. |
|
Claude finished @Gasoonjia's task in 57m 18s —— View job Request Changes on Detailed review (generated with Claude Code)PR Review: #25422SummaryThis PR adds the opt-in ABI 3 ( Code Quality
Infrastructure
Testing
API Design
Backward Compatibility
Performance
RecommendationRequest Changes
Pending validation (read-only snapshot at about 23:55Z; nothing was dispatched or rerun):
Prior-head failures:
🤖 Review generated with Claude Code |
|
@claude /pr-review Please review the complete updated feature at The blocking Buck kernel packaging was fixed in Local validation: 31 production host C++ tests with ASAN/UBSAN, 8 actual parser/ABI tests, 13 checker/gate/workload tests and 10 CI configuration tests pass; actual C++ translation units pass declaration-only syntax. Three independent reviewers covered all 27 files; the missing test dependency they found was corrected and covered. Please give a final code verdict without waiting for long GPU CI. Inspect current CI read-only; do not dispatch or rerun CI. Predecessor The production-shaped archive cost, current-head exact GPU integration and <=2% performance gate remain required before moving to PR3. No released GPU host is reused. Minor test-hook/ABI API suggestions from the previous review remain tracked, rather than being represented as fixed. |
PR review in progress: #25422 at
|
|
@claude /pr-review Please review the new head The repair preserves growth slack during automatic Ring packing and restricts compile-only metadata placeholders to explicitly runtime-owned empty KV storage in the final program. Graph-owned aliases, nonzero metadata, original autotuning inputs and production attention geometry remain preserved. It adds production/default-initial-capacity growth regressions, actual compile-hook tests and flushed export-resource diagnostics. Three blind local reviewers covered the complete diff with no findings. Local32C++ ASAN/UBSAN,10Torch/hook,15checker and11CI configuration tests pass. The new host test rejects the preceding planner at token1025. Declaration-only C++ checking is not CUDA execution. Current-head natural-push CI must supply new GPU evidence. Earlier runtime/system passes and earlier report-only green timing jobs do not qualify this head. The <=2% same-work steady/lifecycle performance gate remains required before PR3. Read-only CI inspection only: do not manually dispatch or rerun workflows. |
PR Review: #25422
|
|
@claude /pr-review Please review current head Keep all numerical, owner-lifecycle, graph, memory and <=2% performance gates. Do not restart or dispatch CI, lower the production geometry, weaken the runtime metadata checks, or treat report-only timing as performance approval. Please post a final verdict for this head when the review and relevant CI evidence are available. |
|
Needs Discussion (provisional while the ABI 3 CUDA jobs run): the three-reviewer pass found no numerical or owner-lifecycle defect at Detailed review of PR #25422 at
|
|
@claude /pr-review Please review the complete PR #25422 feature at |
|
Claude finished @Gasoonjia's task in 49m 31s —— View job PR Review: #25422 at
|
|
@claude /pr-review Please review current head The new commit batches independent private metadata/undo copies on CUDA13.2+ non-legacy streams, skips stable-generation owner layout reconstruction, and avoids temporary maps for sorted unique archive runs. Verify stream ordering, host staging/descriptor lifetime, legacy/older runtime fallback, error fencing, transactional validation, graph bindings and numerical coverage. Neither archive fences nor measured lifecycle work were removed. Local CPU-only speedups do not establish GPU/native qualification. Predecessor9c passed native exact finite logits, memory and graph gates but failed all42 <=2% timing points in report-only CI; production failed ABI2 late contraction and did not reach ABI3. Distinguish new-head evidence from predecessor results and keep the performance gate required before PR3. The remaining stack explicitly retains byte-aware allocator reclamation, router coalescing and prefix save/restore scope. |
|
Claude finished @Gasoonjia's task in 45m 11s —— View job I found no production correctness defect in Detailed review:
|
Add opt-in ABI3 for independently growing owner history and per-layer step staging while preserving geometric Ring growth and clone/rewind semantics. Review the private row planner and pool, then cache/undo ownership, then Triton addressing, lowering and native qualification. Authored with OpenAI Codex.
Preserve owner spans inside a geometric arena and copy only evicted history on restore. Select Ring source addresses before tile loads, retire failed owners independently, and fence preparation rollback before cross-stream reuse. Extend native qualification to lifecycle timings and driver-visible contraction. Authored with OpenAI Codex.
Review the target-aware SDPA pipeline policy and its device/export-budget tests first, then the Buck kernel package registration and import-contract test. The cache phase counters and native report keep the existing end-to-end performance gate while exposing preparation, commit and archive wall-time costs; the archive counters include device waits and are subsets of commit. Authored with OpenAI Codex.
Compact live spans from their current requirements so a short session can release capacity inherited from a closed long session. Exercise real native cache/kernel integration with owner- and position-varying tokens, rejecting matching non-finite logits and checking ID reuse. Add a separate production MG attention/cache geometry profile, its bounded host undo accounting and A100 CI; keep automatic timing report-only without treating it as performance qualification.
…ation Limit unused replacement row height during trimming width contraction while retaining live Ring history and transactional commits. Keep construction-error metrics safe and verify allocator savings, every captured forward stage and unambiguous timing qualification. Preserve runtime-owned AOTI constant extents through an explicit post-generation rewrite. Authored with Codex (OpenAI).
Batch independent metadata and Ring undo transfers while preserving stream ordering and host fences. Reuse physical layout descriptors and validate sorted archive owners without temporary map nodes. Keep older CUDA and legacy stream copies supported, and cover transactional archive validation and stream/growth behavior. Authored with Codex (OpenAI).
221af30 to
785257e
Compare
|
@claude /pr-review Please review current head |
|
Claude finished reviewing PR #25422 · View job run Request Changes. ABI 3 blocks the host on every commit, can crash on a host OOM in its ≈14.8 GiB undo history, and synchronizes the whole device on every Detailed reviewSummaryPR2 adds cache ABI 3 (
It also adds compile-time placeholders for runtime-owned KV, a one-stage D=256 fallback in
Code Quality
Infrastructure
Testing
Backward Compatibility
Performance
RecommendationRequest Changes Four issues block approval:
Even with those fixed, GPU exact correctness and the ≤2% steady/lifecycle gate remain unqualified for 🤖 Generated with Claude Code |
3bff904 to
21587c4
Compare

Builds on #25621. Each session gets an independently sized KV span that grows on demand, and Ring layers share staging for the current forward instead of reserving write headroom per session. This reduces GPU memory use when session lengths differ and at high concurrency; host undo history preserves Ring clone/rewind behavior.
Opt in with
--private-kv-rowsfor CUDA solo, text-only BF16 batching. Tests cover private-row growth, shared staging, clone/rewind, memory bounds, and CUDA graph replay. Numerical and performance qualification is still in progress.Authored with OpenAI Codex assistance.