Skip to content

Use f16 accumulator instead of f32 #32

Closed

Description

@i-zhen

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?

Activity

  1. LyricZhao commented on Mar 3, 2025

    @LyricZhao
    Collaborator

    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).

  2. i-zhen commented on Mar 4, 2025

    @i-zhen
    Author

    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~

  3. added a commit that references this issue on Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions