[None][perf] Use bf16 custom router GEMM kernel for DeepSeek-V4#13646
Conversation
Extend the existing dsv3 router GEMM custom kernel to support hidden_dim=4096 (DeepSeek-V4) in addition to 7168 (V3). For batch<=16, the custom kernel avoids cuBLAS overhead (~3us vs ~8us). For larger batches, cuBLAS fallback is preserved. This eliminates the unnecessary fp32 cast in the router gate forward pass, yielding 3-10% end-to-end throughput improvement on B200. Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com>
|
/bot run |
|
PR_Github #46830 [ run ] triggered by Bot. Commit: |
|
PR_Github #46830 [ run ] completed with state
|
|
/bot run |
|
PR_Github #46843 [ run ] triggered by Bot. Commit: |
|
PR_Github #46843 [ run ] completed with state
|
|
/bot run |
|
PR_Github #46851 [ run ] triggered by Bot. Commit: |
peihu-nv
left a comment
There was a problem hiding this comment.
Tested both the accuracy and perf on B200 and GB200 MTP0/MTP1. All looking good.
|
PR_Github #46851 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #47056 [ run ] triggered by Bot. Commit: |
|
PR_Github #47056 [ run ] completed with state |
Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com> Co-authored-by: peihengh <259410613+peihu-nv@users.noreply.github.com> (cherry picked from commit a3f3775) Signed-off-by: Yuhang He <58161490+heyuhhh@users.noreply.github.com>
Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com> Co-authored-by: peihengh <259410613+peihu-nv@users.noreply.github.com> (cherry picked from commit a3f3775) Signed-off-by: Yuhang He <58161490+heyuhhh@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
…IA#13646) Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com> Co-authored-by: peihengh <259410613+peihu-nv@users.noreply.github.com> (cherry picked from commit a3f3775) Signed-off-by: Yuhang He <58161490+heyuhhh@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com> (cherry picked from commit aa67e3e) Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Extend the existing dsv3 router GEMM custom kernel to support hidden_dim=4096 (DeepSeek-V4) in addition to 7168 (V3). For batch<=16, the custom kernel avoids cuBLAS overhead (~3us vs ~8us). For larger batches, cuBLAS fallback is preserved.
This eliminates the unnecessary fp32 cast in the router gate forward pass, yielding 3-10% end-to-end throughput improvement on B200.
@coderabbitai summary
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.