mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #539] Add delay before trap() to allow printf buffer flush #622
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#622
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/539
Author: @yurekami
Created: 12/25/2025
Status: 🔄 Open
Base:
main← Head:fix-trap-log-flush📝 Commits (1)
90ebb9eAdd delay before trap() to allow printf buffer flush📊 Changes
2 files changed (+8 additions, -0 deletions)
View changed files
📝
csrc/kernels/configs.cuh(+1 -0)📝
csrc/kernels/utils.cuh(+7 -0)📄 Description
Summary
trap()to allow printf buffers to flushProblem
When
trap()is called by one warp during timeout, the kernel execution aborts immediately. Other warps may still have unflushed printf buffers, causing their diagnostic messages (from Forwarder, Sender, Coordinator roles) to be lost.Solution
NUM_TRAP_FLUSH_ITERATIONSconstant (1000 iterations)trap()to delay ~500μs (1000 × 500ns) before executing the trap instruction#pragma unroll 1to prevent compiler optimization from removing the delay loopChanges
csrc/kernels/configs.cuh- AddedNUM_TRAP_FLUSH_ITERATIONSconstantcsrc/kernels/utils.cuh- Modifiedtrap()function with delay loopTest plan
Fixes #480
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.