[GH-ISSUE #561] hang while running test_hybrid_ep.py #345

Closed
opened 2026-10-26 09:58:52 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @crenal on GitHub (Jan 9, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/561

when i run NUM_TOKENS_PER_RANK=4096 python3 test_hybrid_ep.py or NUM_TOKENS_PER_RANK=2048 python3 test_hybrid_ep.py, it works fine.
when i run 'NUM_TOKENS_PER_RANK=4095 python3 test_hybrid_ep.py', it hangs.
Was HybridEP designed not to support this number of tokens?

Originally created by @crenal on GitHub (Jan 9, 2026). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/561 when i run `NUM_TOKENS_PER_RANK=4096 python3 test_hybrid_ep.py or NUM_TOKENS_PER_RANK=2048 python3 test_hybrid_ep.py`, it works fine. when i run 'NUM_TOKENS_PER_RANK=4095 python3 test_hybrid_ep.py', it hangs. Was HybridEP designed not to support this number of tokens?
Author
Owner

@crenal commented on GitHub (Jan 14, 2026):

To correct, this bug only occurs when num_process=2, and NUM_TOKENS_PER_RANK%2==1

<!-- gh-comment-id:3747871550 --> @crenal commented on GitHub (Jan 14, 2026): To correct, this bug only occurs when num_process=2, and NUM_TOKENS_PER_RANK%2==1
Author
Owner

@Autumn1998 commented on GitHub (Jan 30, 2026):

it is not a known issue, and I will try to reproduce it

<!-- gh-comment-id:3822638792 --> @Autumn1998 commented on GitHub (Jan 30, 2026): it is not a known issue, and I will try to reproduce it
Author
Owner

@Autumn1998 commented on GitHub (Feb 2, 2026):

@crenal it is casued by TMA alignment requirement.
TMA cp_async_bulk requires load size to be 16-byte aligned.
load_size = chunk_size * num_of_ranks_per_node * sizeof(int32_t) = chunk_size * num_of_ranks_per_node * 4
When there's a remainder chunk, chunk_size = num_of_tokens_per_rank % num_of_tokens_per_chunk_dispatch_api(128).

I will add assert for this case

<!-- gh-comment-id:3833972343 --> @Autumn1998 commented on GitHub (Feb 2, 2026): @crenal it is casued by TMA alignment requirement. TMA cp_async_bulk requires load size to be 16-byte aligned. load_size = chunk_size * num_of_ranks_per_node * sizeof(int32_t) = chunk_size * num_of_ranks_per_node * 4 When there's a remainder chunk, chunk_size = num_of_tokens_per_rank % num_of_tokens_per_chunk_dispatch_api(128). I will add assert for this case
Author
Owner

@crenal commented on GitHub (Feb 2, 2026):

ok, it seems that in this case we must pad tokens

<!-- gh-comment-id:3834014774 --> @crenal commented on GitHub (Feb 2, 2026): ok, it seems that in this case we must pad tokens
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#345
No description provided.