[PR #538] [CLOSED] Use atomicMax instead of atomicAdd for wait_recv_cost_stats #621

Closed
opened 2026-10-27 21:04:37 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/538
Author: @yurekami
Created: 12/25/2025
Status: ❌ Closed

Base: main ← Head: fix-wait-stats-atomicmax


📝 Commits (1)

  • a0f153f Use atomicMax instead of atomicAdd for wait_recv_cost_stats

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 csrc/kernels/internode_ll.cu (+2 -2)

📄 Description

Summary

  • Changes atomicAdd to atomicMax for dispatch_wait_recv_cost_stats and combine_wait_recv_cost_stats
  • When warps wait in parallel, summing wait times produces misleading metrics
  • Max captures the actual bottleneck latency for performance diagnostics

Changes

  • csrc/kernels/internode_ll.cu:418 - dispatch stats
  • csrc/kernels/internode_ll.cu:973 - combine stats

Rationale

As noted in #473, when multiple warps receive data from the same source rank in parallel, using atomicAdd to sum their wait times doesn't provide meaningful insights. Using atomicMax instead captures the maximum wait time observed, which:

  1. Identifies the actual communication bottleneck
  2. Helps diagnose slow compute ranks
  3. Provides actionable latency metrics for tools like DeepXTrace

Fixes #473

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepEP/pull/538 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-wait-stats-atomicmax` --- ### 📝 Commits (1) - [`a0f153f`](https://github.com/deepseek-ai/DeepEP/commit/a0f153fabe2b731bc2398b9241f137293850e938) Use atomicMax instead of atomicAdd for wait_recv_cost_stats ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `csrc/kernels/internode_ll.cu` (+2 -2) </details> ### 📄 Description ## Summary - Changes `atomicAdd` to `atomicMax` for `dispatch_wait_recv_cost_stats` and `combine_wait_recv_cost_stats` - When warps wait in parallel, summing wait times produces misleading metrics - Max captures the actual bottleneck latency for performance diagnostics ## Changes - `csrc/kernels/internode_ll.cu:418` - dispatch stats - `csrc/kernels/internode_ll.cu:973` - combine stats ## Rationale As noted in #473, when multiple warps receive data from the same source rank in parallel, using `atomicAdd` to sum their wait times doesn't provide meaningful insights. Using `atomicMax` instead captures the maximum wait time observed, which: 1. Identifies the actual communication bottleneck 2. Helps diagnose slow compute ranks 3. Provides actionable latency metrics for tools like DeepXTrace Fixes #473 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:04:37 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#621
No description provided.