Skip to content

tests: bounded pressure loops and teardown barrier for test_ep - #735

Open
Xuan-1998 wants to merge 1 commit into
deepseek-ai:mainfrom
Xuan-1998:test-ep-pressure-iterations
Open

tests: bounded pressure loops and teardown barrier for test_ep#735
Xuan-1998 wants to merge 1 commit into
deepseek-ai:mainfrom
Xuan-1998:test-ep-pressure-iterations

Conversation

@Xuan-1998

Copy link
Copy Markdown

Add --pressure-iterations to bound the pressure-test loop (upstream's --do-pressure-test runs int(1e9) seeds, i.e. until killed; 0 keeps that behavior), with argument validation. Add a barrier before dist.destroy_process_group() so a fast rank cannot tear down the TCPStore while slower ranks are still in destroy.

Add --pressure-iterations to bound the pressure-test loop (upstream's
--do-pressure-test runs int(1e9) seeds, i.e. until killed; 0 keeps that
behavior), with argument validation. Add a barrier before
dist.destroy_process_group() so a fast rank cannot tear down the
TCPStore while slower ranks are still in destroy.

Signed-off-by: Xuan Jiang <xuanj@amazon.com>
Comment thread tests/elastic/test_ep.py
Comment thread tests/elastic/test_ep.py
Comment thread tests/elastic/test_ep.py
@ds-review-bot

Copy link
Copy Markdown
Collaborator

🤖 ds-review-bot Code Review

v6

变更正确实现了可配置的压力测试迭代次数及参数校验,并在销毁进程组前增加了同步屏障。未发现会破坏现有行为或测试的缺陷。

v5

本 MR 只改动 tests/elastic/test_ep.py,与描述一致:(1) 新增 --pressure-iterations 参数用于限定压力测试循环的 seed 数量,0 保留上游 int(1e9)(跑到被杀)的行为,并带有参数校验(非负、且必须与 --do-pressure-test 搭配使用,校验顺序合理,负值场景不会漏报);(2) 在 dist.destroy_process_group() 之前加入 dist.barrier(),避免快的 rank 在慢的 rank 仍处于 destroy 流程时提前拆除 TCPStore。pressure_iteration_count 的计算逻辑正确且向后兼容;较大迭代数配合非 --reuse-elastic-buffer 时每个 seed 重建 ElasticBuffer 属既有预期行为。整体可合入,以下为非阻塞性改进建议。

v4p

MR 为 tests/elastic/test_ep.py 的压力测试循环新增 --pressure-iterations 参数以支持有界执行(0 保持原有 int(1e9) 次的无界行为),并补充参数校验;同时在 dist.destroy_process_group() 前增加 dist.barrier(),避免快 rank 在慢 rank 仍执行 buffer.destroy() 时提前拆除 TCPStore。整体实现简洁、逻辑正确,参数校验与默认行为均符合 MR 描述,未发现明确问题。

Files reviewed: 1
Issues found: 🔵 3 suggestion
Inline comments posted: 3

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.

3 participants