mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #352] low latency test error with "dispatch_use_fp8 and round_scale and use_ue8m0" #245
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#245
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?
Originally created by @dongwang4096 on GitHub (Aug 5, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/352
In file DeepEP/tests/test_low_latency.py, I added the code (Line 79-83 ):
73 # Check received data
74 if current_x is not x_pure_rand:
75 recv_x = recv_x[:num_valid_tokens]
76 recv_x_amin = recv_x[:, :-128].amin(dim=-1)
77 recv_src_info = recv_src_info[:num_valid_tokens]
78 assert torch.equal(recv_x_amin, recv_x[:, :-128].amax(dim=-1))
79 if dispatch_use_fp8 and round_scale and use_ue8m0 :
80 recv_x_last = recv_x[:, -1]
81 if (recv_x_last < -1).any():
82 print(round_scale,use_ue8m0)
83 print(f"rank {rank}, num_times {num_times}, expert_id: {expert_id}, recv_x_last contains values less than -1!, nu m_valid_tokens: {num_valid_tokens}, recv_x_last: {recv_x_last}")
When running the test with dispatch_use_fp8=True, round_scale=True, and use_ue8m0=True on GB200, the condition (recv_x_last < -1).any() is triggered (Line 83 ). This indicates that invalid negative values are appearing in recv_x_last, which should not happen.
Command:python DeepEP/tests/test_low_latency.py --num-processes 4 --num-tokens 768
@shifangx commented on GitHub (Aug 22, 2025):
It has be fixed after PR345
by changing from
x_scales = x_scales.view(dtype=torch.int8).to(torch.int) << 23
to
x_scales = x_scales.view(dtype=torch.uint8).to(torch.int) << 23
Root cause is that the function per_token_cast_back() in test case does not treat scale dtype correctly.

@polarstormx commented on GitHub (Sep 18, 2026):
This has been addressed in #345 (commit
c5facf5), so closing as resolved.