mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #701] fix(legacy): avoid undefined 32-bit shift #716
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#716
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/701
Author: @youchengsong
Created: 7/27/2026
Status: 🔄 Open
Base:
main← Head:fix-legacy-shift32📝 Commits (1)
7d9d0cffix(legacy): avoid undefined 32-bit shift📊 Changes
1 file changed (+25 additions, -17 deletions)
View changed files
📝
csrc/kernels/legacy/internode.cu(+25 -17)📄 Description
Summary
Why
When
window == 0xffffffffu,num_empty_slotsis 32. Shifting a32-bit value by its width is undefined behavior in C++, so the compiler is
not required to produce the intended zero value. If the bitmap is not
cleared, the dispatch transaction window can retain stale completion state.
The full-window case has no remaining pending bits, so assigning zero is the
direct representation of the intended state. Other shift counts retain the
existing behavior.
Fixes #366.
Validation
shift exponent 32 is too large0ufor the full-window casebash ./format.shgit diff --check upstream/main...HEADformat.shalso reformats several pre-existing long lines in the samelegacy source file; the only behavioral change is the transaction-window
assignment.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.