Account for dense CP rank loads in retained-activation memory - #922
Conversation
|
Consolidated review record (automated agent review traffic removed 2026-09-17) Change. Follow-up to Shannon's review of #915: dense selective and disabled-recompute CP requests charged every rank for the global token count, so fitting requests could be split or refused. Retained activations are now priced from the busiest rank's actual attention/GDN layout with TP padding; the 27B 4k pair estimates 69.5 GiB (62.9 observed) instead of 117.4. Review. Minsky and McCarthy independently reviewed the full diff at Deferred / follow-ups.
|
Follow-up to Shannon’s review of #915. Dense selective and disabled-recompute requests charged every CP rank for the global token count, so requests that fit could be split or refused. The 27B 4k pair now estimates 69.5 GiB against 62.9 GiB observed and completes backward; its previous 117.4 GiB estimate exceeded the available 81.9 GiB budget.
Price retained token activations using the busiest rank’s actual attention/GDN layout, including TP padding. CP ownership is uneven: that pair has 6,964 packed tokens but 4,096 on its busiest rank, so simply dividing by CP would underprice it. Keep recurrent segment states, gathered outputs, learned-profile floors, and the cold allowance unchanged. CP width selection uses the existing exact-plan fallback, at the cost of additional CPU planning. Full recompute, no-grad, and MoE retain their previous estimates; expert dispatch needs separate CP calibration before a discount.
Native H200 CP2 measurements (incremental allocated GiB, maxima across both ranks and repetitions):
Calibration report · CP CSV
All 13 GPU cells (52 rank-samples) cover the measured forward peak, with at least 8.1% headroom. Every backward completes with finite losses and adapter gradients. This calibrates eager dense TP1/CP2, bf16, random weights, and rank-1 LoRA; larger CP, combined TP/CP, and MoE CP remain uncalibrated. The report records a short-input backward peak above its forward estimate; the estimate is for forward admission. Local GPUs are released; no calibration clusters were needed.
Also records the disabled-recompute behavior change requested in review:
None, including thenoneoverride and EP-overlap trainers, now receives the retained-activation floor from #915. Previously admitted workloads can split or be refused; balanced MoE can be priced about 3× above its peak. This note was added to #915 before merging it.Validation: 637 TrainerRank tests pass (2 skipped), including uneven CP admission, unchanged GDN-state costs, the measured 27B peak, and collective propagation of CP planning failures. Lint and type checking pass. CI is green on
44ea923bf: quality checks passed 783 Megatron tests and 1,561 unit tests (73 skipped); native GPU validation passed, including CP/TP public-API backward checks. The CI cluster was terminated successfully.