Skip to content

[WS2][PR5][Attention] Add distributed CP drift benchmark artifacts - #285

Open
inaniloquentee wants to merge 1 commit into
codex/ws2-pr8-cp-attention-backwardfrom
codex/ws2-pr5-cp-attention-drift
Open

[WS2][PR5][Attention] Add distributed CP drift benchmark artifacts#285
inaniloquentee wants to merge 1 commit into
codex/ws2-pr8-cp-attention-backwardfrom
codex/ws2-pr5-cp-attention-drift

Conversation

@inaniloquentee

@inaniloquentee inaniloquentee commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a rank-aware WS2 CP attention drift benchmark for Qwen3-8B TP=1/2 and CP=1/2.
  • Record CP merge drift, BF16-vs-FP32 drift, RoPE provenance, per-logical-CP-rank metrics, and optional PR8 backward drift.
  • Reuse Transformer Engine only as an optional merge oracle via the context-parallel correction helpers; RL-Kernel remains the reference merge contract.

Testing

Windows / local CI checks:

  • pre-commit run --all-files
  • py -3.13 -m pytest tests/test_ws2_cp_attention_drift_benchmark.py tests/test_cp_attention.py tests/test_operator_inputs.py -q (45 passed)
  • py -3.13 -m pytest tests/test_attention.py tests/test_kv_cache_attention.py tests/test_attention_correctness.py -q (85 passed, 83 skipped)
  • py -3.13 -m mypy --ignore-missing-imports rl_engine/
  • py -3.13 -m mkdocs build --strict -f mkdocs.yaml
  • py -3.13 scripts/check_operator.py --op cp_attention --check-grad
  • py -3.13 benchmarks/benchmark_ws2_cp_attention_drift.py --smoke --json
  • py -3.13 benchmarks/benchmark_ws2_cp_attention_drift.py --smoke --tp-world-sizes 2 --cp-world-sizes 2 --kv-chunk-sizes none,1 --include-backward --device cpu --output $env:TEMP\ws2-cp-attention-drift-pr5.json

WSL validation:

  • python3 -m pytest tests/test_ws2_cp_attention_drift_benchmark.py tests/test_cp_attention.py tests/test_operator_inputs.py -q (45 passed)
  • python3 -m pytest tests/test_attention.py tests/test_kv_cache_attention.py tests/test_attention_correctness.py -q (39 passed, 129 skipped)
  • python3 benchmarks/benchmark_ws2_cp_attention_drift.py --smoke --tp-world-sizes 2 --cp-world-sizes 2 --kv-chunk-sizes none,1 --include-backward --device cpu --json
  • python3 -m torch.distributed.run --nproc-per-node=2 benchmarks/benchmark_ws2_cp_attention_drift.py --smoke --tp-world-sizes 2 --cp-world-sizes 2 --kv-chunk-sizes none --device cpu --json

Notes:

  • WSL tests used CPU execution. The WSL PyTorch install warned that the local NVIDIA driver is older than the CUDA wheel; no CUDA path is claimed by this PR.
  • Windows torchrun was blocked by the host PyTorch libuv rendezvous build before script launch; WSL torch.distributed.run passed for the torchrun-style rank-aware path.

Notes

Signed-off-by: inaniloquentee <3051000145@qq.com>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 78c077c6-8010-4c2f-9b90-39bbc449c024

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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