Skip to content

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

Open
inaniloquentee wants to merge 27 commits into
testfrom
codex/ws2-pr5-cp-attention-drift
Open

[WS2][PR5][Attention] Add distributed CP drift benchmark artifacts#285
inaniloquentee wants to merge 27 commits into
testfrom
codex/ws2-pr5-cp-attention-drift

Conversation

@inaniloquentee

@inaniloquentee inaniloquentee commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements PR5 of #235: the rank-aware WS2 Attention acceptance runner, report schema, and fail-closed validation for distributed forward, backward, communication, and repeatability evidence.

Gate

Lane Role Acceptance boundary
CP reference benchmark Forward/backward attribution and rank-aware report generation Validates required metrics and provenance; not production communication by itself
p2p_nccl_reference Independent communication correctness reference Fixed logical block order and FP32 (Out, LSE) merge; no strict training autograd claim
cuda_ag_rs --strict-shared-core Required production operator gate Same deterministic core for train/rollout, self-owned AG/RS autograd, Split-KV disabled, no native arithmetic/fallback
FlashInfer / TE / Megatron Compatibility or diagnostic lanes Never substitute for the strict shared-core gate
AllReduce Optional diagnostic Outside the Attention required gate

The validator rejects CPU/dry-run-only evidence, missing CUDA/NCCL, incomplete topology/manifests, fallback, non-FP32 merge state, wrong downcast point, missing gradients, or non-bitwise repeats.

Strict H100 results

GPUs Topology Replicas Out / LSE / dQ / dK / dV Repeat Result
2 TP=1, CP=2 1 Bitwise; max abs 0.0 Out/LSE bitwise Pass
4 TP=2, CP=2 1 Bitwise; max abs 0.0 Out/LSE bitwise Pass
8 TP=2, CP=2 2 Bitwise; max abs 0.0 Out/LSE bitwise Pass

Every rank reported global_failure_count=0, core_id=rlkernel.attention.deterministic_core.v1, fallback=false, native_attention_arithmetic=false, and communication_autograd=true.

Evidence

Artifact / check Result
strict-shared-core-agrs-2rank-8309b77.json Passed
strict-shared-core-agrs-tp2-cp2-4rank-8309b77.json Passed
strict-shared-core-agrs-tp2-cp2-replica2-8rank-8309b77.json Passed
Focused local validator suite 22 passed
Formatting, compile, and diff checks Passed

Boundary

This PR accepts operator-level Attention evidence. It does not turn optional native TE/FlashInfer arithmetic, AllReduce, or an unfurnished Megatron/vLLM checkpoint run into a required result. The executable strict path is owned by #279; backward semantics are owned by #284. Related: #235, #294.

@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: c326438e-ab01-4e25-8618-84fa184de180

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.

# Conflicts:
#	docs/operators/attention.md
#	rl_engine/kernels/ops/pytorch/attention/cp_attention.py
#	tests/test_cp_attention.py
@inaniloquentee
inaniloquentee changed the base branch from codex/ws2-pr8-cp-attention-backward to test August 12, 2026 16:13
@inaniloquentee
inaniloquentee force-pushed the codex/ws2-pr5-cp-attention-drift branch from 1803e34 to 3347ecd Compare August 17, 2026 12:58
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