Repository navigation
Conversation
# Conflicts: # atom/models/kimi_k3/model.py
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
Path scope:
|
whx-sjtu
left a comment
There was a problem hiding this comment.
ATOM PR #3638 — Category B source/CPU sections
Projects rank-local tails, carries typed columns into residual and standard DSpark consumers, overlaps independent bank work, and preserves simulated-TP fallback.
Review: ✅ LGTM for the five source/CPU sections at e83be33; no whole-category, GPU or landing approval. Dependency and qualification holds remain.
Coverage: 2 files / 136 added lines -- within one review pass
Coverage: 6 files / 422 added lines -- within one review pass
Coverage: 1 files / 149 added lines -- within one review pass
Coverage: 0 files / 0 added lines -- within one review pass
Coverage: 1 files / 10 added lines -- within one review pass
Validation (advisory): reviewer Windows CPU at e83: 47 passed, 179 skipped; one run, this box, unverified. Two simulated-TP regressions fail with pre-fix methods restored, then 26 fallback/capability/rank controls pass. GPU numerical/fullgraph/replay, peer lifetime, model accuracy and complete-operation timing remain unrun.
Section scope and evidence
Coverage lines follow these immutable ranges, in order: immediate tail cb6f1af..8b80095; transport/aux 8b80095..e66acec; polling e66acec..9dd2431; test grid 9dd2431..3eed4e2; simulated-TP repair 3eed4e2..e83be33. Inherited Category A is excluded.
The e66 transport snapshot stays frozen; its simulated logical8/physical4 admission defect is resolved by the e83 repair. Both _column_tail_eligible and _init_column_gather refuse the actual simulated-group marker. Restoring the original methods makes test_tail_keeps_safe_fallbacks[simulated_tp] and test_exchange_binds_only_safe_local_consumers[simulated_tp] fail their eligibility and no-allocation assertions.
Connected checks covered public AITER stride/FP32-epilogue contracts, real/fake tensor output shape, ordinary-reader materialization, last-local-layer output, standard versus custom/input/PP auxiliary taps, mono auxiliary writes, and cleanup order. The CPU AOT and lifecycle controls do not establish live multi-rank/stream/graph safety. The polling source preserves candidate order, but compiler contraction and parity with e66 still need GPU evidence. Expanded GPU definitions are not execution evidence. Historical CI results are not transferred to this head.
valar-cop
left a comment
There was a problem hiding this comment.
some changes needed..
gpu run of the peer-column exchange and the triton poll kernel? accuracy/perplexity for the front-merged gemm? fullgraph/cuda-graph replay for ColumnTail? timing for the overlap on mi300/mi350?
ci green.
whx-sjtu
left a comment
There was a problem hiding this comment.
ATOM PR #3638 — Allocate column peers after producer setup
Allocates column-peer storage only after the loaded producer's shared capability check succeeds, without letting an initial prefill disable later decode.
Review: ✅ LGTM for the allocation delta e83be3372c7235f40a055631530665128e7d23bc → ff9e8922fd3188892d7a8347a4e6805db08b07df. No source/CPU blocker found; prior e83 sections retain their own scope. No whole-category, hardware or landing approval.
Coverage: 1 files / 48 added lines -- within one review pass
Validation (advisory): Independent Windows controls pass all five allocation cases; the actual original e83 method restored in memory fails all four unsupported-producer checks. The controls use real model/linear/norm/front/loader methods with meta storage and substituted I/O, GPU compute and peer allocation. Maintained Linux CPU CI passed 15,263 tests, skipped 1,727 and xfailed 3; JUnit confirms all five controls executed, and Black/Ruff/catalog passed. CI tested merge 45a0d54959d8d0c7000ad9e560aba6eb8397bdd7 of ff9 with main cbf161746, not an isolated-head full-suite run. Eligibility uses uniform loaded-model metadata; real peer agreement, allocation failure/lifetime, GPU/model/fullgraph/replay and performance remain unqualified. Category A landing and future #3577/Category C integration, formal review and final-tree gates remain open under hold landing.
|
ci triage for ff9e892:
|
|
Part of the GPU qualification question: peer/poll/replay and numerical/fullgraph checks pass; native FULL model accuracy covers the merged front. Isolated overlap benefit, perplexity and MI300 timing remain unmeasured. Results and scopeff9e8922, exercised within
|
The token-graph hunks of ROCm#3636's integration commit 80ae966 ("Integrate Kimi prefill graphs and explicit residual storage contracts"), verbatim: - `_KimiMLAGDNCommon.supports_token_graph` also accepts a target MLA layer that is sparse and carries a bound unscaled BF16 query layout (`TokenGraphQueryLayout`), so Kimi-K3.1 at DP1/PCP1 records its prefill buckets. Quantized or unknown query layouts keep eager execution. - The layout check moves from `_attention` into `_attention_region`, so a plain eager call never enters the token-graph helper. - docs: ATOM_TOKEN_GRAPH_SIZES names the K3.1 regions. - tests: the gate's accept/refuse cases and the plain-call bypass. Left out, because this head has none of the code they integrate with: the row tail's in-graph guard and the KDA in_proj split on buckets (ROCm#3587), ColumnTail materialization at tensor-only boundaries (ROCm#3637/ROCm#3638), and the native eager residual's absent addends (the ROCm#3317 part, which exists only on a row-sharded step). Whoever merges those stacks with this one needs those hunks of 80ae966 too. Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit c24b52a) Conflict in atom/models/kimi_k3/model.py (this commit was written against main without ROCm#3637) resolved as in upstream merge 931b22b ("Merge Category A interfaces for local tail integration") of ROCm#3638. Ported from ROCm#3638. Co-authored-by: Cursor <cursoragent@cursor.com>
…ROCm#3637 ROCm#3638) k31-opt2/PT4@2c68a46f Conflicts resolved as ROCm#3636 does for PT3 (ROCm#3577/ROCm#3582/ROCm#3587) + PT4: - kimi_k3/attention_residual.py: PT4's kernel with PT3's num_blocks bound; PT3's int64 bank offsets (71a6aba) moved into PT4's _mix_tile and kernel. - model.py: column tail first (decode, 1-64 tokens), then PT3's dispatch op; row tail (>= ATOM_KIMI_K3_MOE_ROW_SHARD_MIN_TOKENS) before PT4's one-AR split; aggregate materializes column pendings; per-phase token_graph.
Closes https://github.com/wuhuikx/LLM-Booster/issues/698. Ready for human review. All peer/GPU/model/fullgraph/timing, Category A and final-integration holds remain.
Category B carries rank-local columns into the next attention-residual kernel, overlaps bank-only mixing with the exchange, and captures standard DSpark taps from the complete, unnormalized sum. Ordinary readers materialize columns explicitly; unsupported paths retain immediate results.
Depends on Category A, #3637, inherited at cb6f1af. The B-only range ends at ff9e892. After A lands, main will be append-merged so the final diff contains B only.
Dev record
Named result
Gates
Current ff9 allocation review is source/CPU clear, complementing the prior five-section B review. Linux CI 44745088544 passes 15,263 tests, with 1,727 skipped and 3 xfailed; all five new controls ran. CI tested the ff9+main merge tree, detailed below. GPU/model/fullgraph/replay, peer lifetime, timing, parent and final-tree gates remain open.
Evidence, review sections and scope
Current CI provenance: non-GPU unit job 136318219570 tested merge 45a0d54, combining ff9e892 with main cbf1617. It reports 15,263 passed, 1,727 skipped, 3 xfailed, 9 warnings in 630.65 seconds; Black/Ruff/catalog passed. This is merge-tree CI, not an isolated ff9 full-suite run. JUnit confirms all five allocation controls executed. Native Accuracy 136318415116 skipped.
The independent allocation review completed all seven gates and a non-author pass. It verified five repaired controls and four failures with the original e83 method restored. The prior e83 source/CPU sections retain their exact scope; inherited A is excluded. Neither review grants whole-category, hardware or landing approval. Eligibility relies on the intended uniform loaded-model schema; live peer agreement, allocation failure/lifetime and GPU/model/fullgraph/replay/performance remain unqualified.
Immutable transport/aux review: 8b80095 to e66acec. Polling delta: e66 to 9dd2431. Test-only exhaustive tail grid: 9dd to 3eed4e2. Simulated-TP repair: 3eed4e2 to current head. The independent review completed all five sections at e83 using these immutable ranges and a fresh blind pass; inherited A was excluded.
Head e83 passed maintained non-GPU unit job 136262016491 in run 44728494932: 15,258 passed, 1,727 skipped, 3 xfailed, 9 warnings in 795.67 seconds. Black, Ruff and catalog jobs also passed. Native wrapper run 44728494896 succeeded with actual Accuracy job 136262045631 skipped. The scoped review is COMMENTED/LGTM for source/CPU; it is not GPU, whole-category or landing approval.
Final-main integration must reconcile #3577 after its repair is frozen: the planned active-bank count through AttnRes/apply variants, written-prefix PP transfer/reconstruction, and mono bank/aux ownership changes. The frozen #3577 integration surface is active-bank counts, written-prefix PP transfer/reconstruction and mono bank/aux ownership; current review does not approve that future combination. Category C must inherit the ff9 setup fix before its final integration review. Category A must also land, followed by the required main merge and exact-tree checks.
Windows transport controls cover typed-producer AOT without input-storage clones, ordinary-reader materialization, fused-consumer dispatch, target-to-drafter tap mapping/rounding, and normal/failure/idempotent teardown. The broader 106/72 result predates GPU test-definition additions and is preserved working-tree evidence. The 26/11 focused result follows the closure fixes. This environment does not qualify Linux or GPU behavior.
The polling order adapts the existing consumer algorithm from historical #3357 and #3359. No historical timing is reused. Changing the loop structure can change compiler contraction; gathered/full byte parity, plain-output deltas against e66, and model accuracy remain GPU gates.
The allocation repair addresses inline4642521802. Actual Kimi/Linear/RMSNorm/front-merger objects with meta storage exercise the real loader traversal; checkpoint I/O, GPU compute and peer allocation are substituted. Unsupported front, norm fusion, output destination and up-weight dtype allocate nothing. Supported setup binds after the front merge without a forward context and remains eligible for decode after prefill. Repeated setup does not allocate again. Five focused controls pass; the affected front/B suites 75 passed, 179 skipped.
Review 5992773882 also requests GPU exchange/poll, front-GEMM accuracy/perplexity, ColumnTail graph replay and overlap timing. Front GEMM belongs to A/#3637; its existing one-GPU inline-FusedMoE-view witness does not satisfy front-GEMM or full-model perplexity. Use a matched combined A+B model evaluation when it covers both, without duplicate full runs. B has no architecture-name gate; gfx950 qualification is planned, while MI300/gfx942 execution/timing remains unverified and unpromised.
GPU definitions cover all T=1..64 and eight rank shares with two seeds and padded/contiguous rows; the exact double-rounding boundary; bank counts 1..12 at T=1/4/7/16/32/64 in BF16/FP8; an independent exact mean oracle; and opt-in eight-rank replay stress. The added allocation controls are CPU checks; expanded GPU definitions remain unrun. No GPU test ran. The one-GPU peer test emulates publishers and does not replace real peer concurrency or quiescence evidence.
Extra files: atom/model_engine/model_runner.py invokes the optional resource hook before destroy_dist_env, and only Kimi implements it. atom/model_ops/attention_residual.py materializes typed columns before ordinary fallback additions. Source and CPU call-order checks do not establish live multi-rank/stream/graph lifetime safety.
The reused AITER API is aiter.ops.triton.gemm.fused.fused_gemm_a16w16_mul_add.fused_gemm_a16w16_mul_add, inspected at 73960daf4e1e8ff99da6bdcef042840150c86c5b, introduced by AITER #6674 as 9837f06b983e6d008697d8959313711a56d5d18d. ATOM retains its model-sensitive norm wrapper. No standalone tail primitive was copied.
The simulated-TP controls invoke the actual _patch_group with logical TP8 and physical TP4. Before repair, eligibility stayed enabled and the binder requested eight peers; both tests failed. After repair, the existing simulated collective path is retained, and real-TP positive controls remain green. This was a CPU source finding, not a GPU failure.
Current B-only scope: 767 non-test changed lines and 1039 test lines, within the approved grouped estimates. The earlier replicated-tail mutation failed all eight rank-view controls and was restored.