mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #708] Make the host-side dispatch timeout self-attributing #722
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepEP#722
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepEP/pull/708
Author: @dmvevents
Created: 7/29/2026
Status: 🔄 Open
Base:
main← Head:hostside-timeout-attribution📝 Commits (3)
cf75cd6Make the host-side dispatch timeout self-attributing8b06138Snapshot the counters once before formatting the timeout message8574ff9Deduplicate the timeout report and capture the throw line exactly📊 Changes
1 file changed (+77 additions, -6 deletions)
View changed files
📝
csrc/legacy/buffer.hpp(+77 -6)📄 Description
Problem
The two host-side CPU-wait timeouts in
csrc/legacy/buffer.hppreport the symptom but not its origin.buffer.hpp:596(intranode dispatch) throwsDeepEP error: CPU recv timeoutwith no diagnostics at all — no rank, no counters, no elapsed time.buffer.hpp:1105(internode dispatch) prints the total and per-expert counters, but the exception text itself carries nothing. Once theprintfoutput is separated from the exception — multi-rank log interleaving, or only the Python traceback captured — the attribution is gone. The single surviving signal is-1, which says nothing about which counter never arrived, how long the wait actually was, or where the throw came from.Change
Diagnostics only — no behaviour change. Both sites now carry, in the exception text:
__FILE__/__LINE__rankandnum_local_expertsThe existing
printflines at the internode site are preserved verbatim, and both error strings keep their original prefixes (DeepEP error: CPU recv timeout,DeepEP error: timeout (dispatch CPU)) with new detail appended after.Verification
g++ -std=c++17 -Wall -Wextra— clean, no warnings.{-1, 0, -1, 5}); the message names experts 0 and 2 as stalled and correctly omits the two that were ready.Global rank: …line, all per-expert lines, and both error-string prefixes still match their original patterns; pre-patch logs from a real failure also still match the same scanner. A silently blinded scanner would turn a real timeout into a false pass, so this was verified rather than assumed.#include <string>, which was not previously included directly, rather than relying on a transitive include forstd::string/std::to_string.Motivation
On AWS EFA we hit this exact timeout across a batch of 384-expert runs. The cause turned out to be a build-configuration regression in our own image — but the log could not have told us that; recovering it took source archaeology plus a bisect against a known-good image. With this patch the exception alone distinguishes "no counter ever arrived" (dead transport) from "some experts arrived and others did not" (partial routing), which is the first branch point in any such investigation.
Relation to #704
Complementary, non-overlapping. #704 makes the device-side low-latency
trap()self-attributing (the origin of a sticky CUDA 719) incsrc/kernels/legacy/internode_ll.cu. This PR does the host-side twin incsrc/legacy/buffer.hpp, where the CPU busy-wait throws. Different files, different failure paths — in our own logs a word-boundary search for719/LAUNCH_FAILED/cudaErrorLaunchFailurereturns zero, so our failures are purely the host-side path this PR covers. Both are needed for the same reason: today the error signal does not identify where it came from.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.