Skip to content

[dist] reuse comm groups when possible for memory saving - #5111

Open
gbyu-amd wants to merge 4 commits into
mainfrom
guanbao/reuse-comm-groups
Open

[dist] reuse comm groups when possible for memory saving#5111
gbyu-amd wants to merge 4 commits into
mainfrom
guanbao/reuse-comm-groups

Conversation

@gbyu-amd

@gbyu-amd gbyu-amd commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Motivation

The comm group reuse was originally done in ROCm/ATOM#2050. Now implement it in aiter side to make it safer.

The purpose is to reuse comm buffers for different comm groups when they share the same ranks and collectives are issued in sequence. This can reduce considerable non-torch memory allocation, therefore leaving more capacity to KV cache.

Before:

[atom 21:34:21] Memory budget: total_gpu=287.98GB, free=63.91GB, utilization=0.86, budget=247.67GB, peak_torch=192.92GB, non_torch=30.21GB, cudagraph_est=0.40GB, safety=5.76GB, available_for_kv=18.37GB, block_bytes=1769472, num_kvcache_blocks=6832

By reusing the comm groups with this PR, non-torch memory now only takes 13GB out of the budget, almost doubles the kv cache:
After:

[atom 04:36:43] Memory budget: total_gpu=287.98GB, free=80.78GB, utilization=0.86, budget=247.67GB, peak_torch=192.91GB, non_torch=13.40GB, cudagraph_est=0.40GB, safety=5.76GB, available_for_kv=35.20GB, block_bytes=2138112, num_kvcache_blocks=13727

Technical Details

Test Plan

Test Result

Submission Checklist

@gbyu-amd
gbyu-amd requested a review from a team August 29, 2026 14:12
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
multigpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 5111 --add-label <label>

PR title tags:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf] and op tags like [MLA] are left untouched. Add the no-auto-title label to opt this PR out of title tagging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant