[GH-ISSUE #395] A bug about 'sizeof(int4)' in 'deep_ep.cpp' #269

Closed
opened 2026-10-26 09:57:41 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @arminzhu on GitHub (Sep 8, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/395

Today, I want to test my script, but I got:

Failed: Assertion error /root/DeepEP-main/csrc/deep_ep.cpp:341 '(x.size(1) * x.element_size()) % sizeof(int4) == 0'

Then, I started a debug journey. I surprisingly found a strange phenomenon:

x.size(1): 4
x.element_size(): 2
sizeof(int4): 16
(x.size(1) * x.element_size()) % sizeof(int4): 8

‘int4‘ should be measured in bytes. As far as I know, it takes 1 byte (although 0.5 bytes is enough), but here it is 16.
So, this check seems...

Originally created by @arminzhu on GitHub (Sep 8, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/395 Today, I want to test my script, but I got: `Failed: Assertion error /root/DeepEP-main/csrc/deep_ep.cpp:341 '(x.size(1) * x.element_size()) % sizeof(int4) == 0'` Then, I started a debug journey. I surprisingly found a strange phenomenon: ``` x.size(1): 4 x.element_size(): 2 sizeof(int4): 16 (x.size(1) * x.element_size()) % sizeof(int4): 8 ``` ‘int4‘ should be measured in bytes. As far as I know, it takes 1 byte (although 0.5 bytes is enough), but here it is 16. So, this check seems...
Author
Owner

@hexclover commented on GitHub (Sep 8, 2025):

int4 here is a pack of 4 32-bit integers, not a 4-bit integer.

<!-- gh-comment-id:3265364911 --> @hexclover commented on GitHub (Sep 8, 2025): `int4` here is a pack of 4 32-bit integers, not a 4-bit integer.
Author
Owner

@arminzhu commented on GitHub (Sep 8, 2025):

int4 here is a pack of 4 32-bit integers, not a 4-bit integer.

Okay. The shape asserts may encounter some failures. I will close this issue.

<!-- gh-comment-id:3265884808 --> @arminzhu commented on GitHub (Sep 8, 2025): > `int4` here is a pack of 4 32-bit integers, not a 4-bit integer. Okay. The shape asserts may encounter some failures. I will close this issue.
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#269
No description provided.