[GH-ISSUE #32] Use f16 accumulator instead of f32 #21

Closed
opened 2026-10-26 21:10:39 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @i-zhen on GitHub (Mar 3, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/32

Hi, thanks a lot for your great contributions.

I just wonder that why a full-precision F32 accumulator is used instead of F16. Such as following assembly code:

wgmma.mma_async.sync.aligned.m64n16k32.f16.e4m3.e4m3

Can we also achieve an acceptable precision with f16 accumulator?

Originally created by @i-zhen on GitHub (Mar 3, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/32 Hi, thanks a lot for your great contributions. I just wonder that why a full-precision F32 accumulator is used instead of F16. Such as following assembly code: ``` wgmma.mma_async.sync.aligned.m64n16k32.f16.e4m3.e4m3 ``` Can we also achieve an acceptable precision with f16 accumulator?
Author
Owner

@LyricZhao commented on GitHub (Mar 3, 2025):

Even FP32 accumulator is not enough (that's why we use two-level accumulation: tensor core (low-precision FP32 accum, hardward "bugs") + CUDA core (full FP32 accum)).

"Not enough" means bad for training.

However, for inference, I guess it is related to different model settings: one-level tensor core FP32 accum (works for DeepSeek-V2 series), or one-level tensor core FP16 (not tested on any model, you can try by yourself).

<!-- gh-comment-id:2693760236 --> @LyricZhao commented on GitHub (Mar 3, 2025): Even FP32 accumulator is not enough (that's why we use two-level accumulation: tensor core (low-precision FP32 accum, hardward "bugs") + CUDA core (full FP32 accum)). "Not enough" means bad for training. However, for inference, I guess it is related to different model settings: one-level tensor core FP32 accum (works for DeepSeek-V2 series), or one-level tensor core FP16 (not tested on any model, you can try by yourself).
Author
Owner

@i-zhen commented on GitHub (Mar 4, 2025):

Even FP32 accumulator is not enough (that's why we use two-level accumulation: tensor core (low-precision FP32 accum, hardward "bugs") + CUDA core (full FP32 accum)).

"Not enough" means bad for training.

However, for inference, I guess it is related to different model settings: one-level tensor core FP32 accum (works for DeepSeek-V2 series), or one-level tensor core FP16 (not tested on any model, you can try by yourself).

Thank you for your kind reply~

<!-- gh-comment-id:2696376395 --> @i-zhen commented on GitHub (Mar 4, 2025): > Even FP32 accumulator is not enough (that's why we use two-level accumulation: tensor core (low-precision FP32 accum, hardward "bugs") + CUDA core (full FP32 accum)). > > "Not enough" means bad for training. > > However, for inference, I guess it is related to different model settings: one-level tensor core FP32 accum (works for DeepSeek-V2 series), or one-level tensor core FP16 (not tested on any model, you can try by yourself). Thank you for your kind reply~
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#21
No description provided.