[GH-ISSUE #60] Weird benchmark results when m < 64 #37

Closed
opened 2026-10-26 21:11:02 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @xiyanjoy on GitHub (Mar 13, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/60

m n k Time (us) TFLOPS GB/s
1 2112 7168 19.5 1.6 778.7
2 2112 7168 19.2 3.1 788.4
4 2112 7168 19.2 6.3 789.4
8 2112 7168 17.3 14.0 882.4
16 2112 7168 17.1 28.3 893.5
32 2112 7168 15.8 61.2 979.4
64 2112 7168 10.0 193.8 1586.6
128 2112 7168 11.5 337.1 1443.8
256 2112 7168 13.2 589.3 1372.6
1 7168 2048 11.1 2.6 1325.6
2 7168 2048 9.1 6.5 1618.6
4 7168 2048 8.4 14.1 1765.3
8 7168 2048 9.2 25.6 1612.5
16 7168 2048 8.7 53.8 1712.8
32 7168 2048 7.9 119.3 1931.0
64 7168 2048 7.2 260.9 2183.6
128 7168 2048 7.8 479.2 2139.4
256 7168 2048 10.3 732.4 1839.1

When m < 64, the DeepGemm will use 64 as block_m. So, in my opinion, the benchmark results of m<64 ought to be close to m=64 (the same access amount of weight, activation and scale, and the same computation flop). However, we observe worse behavior when benchmarking the cases of m<64.

Originally created by @xiyanjoy on GitHub (Mar 13, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/60 | m | n | k | Time (us) | TFLOPS | GB/s | |-------|-------|-------|-----------|--------|--------| | 1| 2112| 7168| 19.5| 1.6| 778.7| | 2| 2112| 7168| 19.2| 3.1| 788.4| | 4| 2112| 7168| 19.2| 6.3| 789.4| | 8| 2112| 7168| 17.3| 14.0| 882.4| | 16| 2112| 7168| 17.1| 28.3| 893.5| | 32| 2112| 7168| 15.8| 61.2| 979.4| | 64| 2112| 7168| 10.0| 193.8| 1586.6| | 128| 2112| 7168| 11.5| 337.1| 1443.8| | 256| 2112| 7168| 13.2| 589.3| 1372.6| | 1| 7168| 2048| 11.1| 2.6| 1325.6| | 2| 7168| 2048| 9.1| 6.5| 1618.6| | 4| 7168| 2048| 8.4| 14.1| 1765.3| | 8| 7168| 2048| 9.2| 25.6| 1612.5| | 16| 7168| 2048| 8.7| 53.8| 1712.8| | 32| 7168| 2048| 7.9| 119.3| 1931.0| | 64| 7168| 2048| 7.2| 260.9| 2183.6| | 128| 7168| 2048| 7.8| 479.2| 2139.4| | 256| 7168| 2048| 10.3| 732.4| 1839.1| When m < 64, the DeepGemm will use 64 as block_m. So, in my opinion, the benchmark results of m<64 ought to be close to m=64 (the same access amount of weight, activation and scale, and the same computation flop). However, we observe worse behavior when benchmarking the cases of m<64.
Author
Owner

@soundOfDestiny commented on GitHub (Mar 13, 2025):

duplicate as https://github.com/deepseek-ai/DeepGEMM/issues/35

<!-- gh-comment-id:2720535368 --> @soundOfDestiny commented on GitHub (Mar 13, 2025): duplicate as https://github.com/deepseek-ai/DeepGEMM/issues/35
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/DeepGEMM#37
No description provided.