mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #94] [MERGED] Refactor JIT compilation (+NVRTC support) #243
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepGEMM#243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/94
Author: @lucifer1004
Created: 5/6/2025
Status: ✅ Merged
Merged: 5/7/2025
Merged by: @LyricZhao
Base:
main← Head:nvrtc📝 Commits (10+)
27cd276[wip] refactor: compile to .cubinc14cad0refactor: compile to .cubin and add NVRTC option78c7fa3fix: compiler version767793bfeat: compat for old driversa3210acfeat: save kernel name to file40c09fbfeat: fix win compat2d8c4f2fix: windows compat6f0a17cMerge pull request #1 from lucifer1004/nvrtc-compat6c98279Merge remote-tracking branch 'upstream/main' into nvrtc46762b6feat: make API more general📊 Changes
19 files changed (+917 additions, -668 deletions)
View changed files
📝
README.md(+22 -12)📝
deep_gemm/include/deep_gemm/fp8_gemm.cuh(+6 -118)📝
deep_gemm/include/deep_gemm/mma_utils.cuh(+2 -0)➕
deep_gemm/include/deep_gemm/nvrtc_std.cuh(+103 -0)📝
deep_gemm/include/deep_gemm/scheduler.cuh(+3 -2)📝
deep_gemm/include/deep_gemm/tma_utils.cuh(+1 -76)📝
deep_gemm/include/deep_gemm/utils.cuh(+4 -23)📝
deep_gemm/jit/__init__.py(+1 -2)📝
deep_gemm/jit/compiler.py(+209 -76)📝
deep_gemm/jit/interleave_ffma.py(+3 -3)📝
deep_gemm/jit/runtime.py(+56 -32)➖
deep_gemm/jit/template.py(+0 -114)📝
deep_gemm/jit_kernels/gemm.py(+51 -50)📝
deep_gemm/jit_kernels/m_grouped_gemm.py(+84 -69)➕
deep_gemm/jit_kernels/runtime.py(+254 -0)📝
deep_gemm/jit_kernels/tuner.py(+26 -24)📝
deep_gemm/utils.py(+1 -18)📝
tests/test_core.py(+5 -0)📝
tests/test_jit.py(+86 -49)📄 Description
With this PR, the JIT compilation time is reduced by ~60% when using NVCC, ~80% when using NVRTC w/o PCH, and ~90% when using NVRTC w/ PCH.
Benchmark on Xeon(R) Platinum 8480C + H100 HBM:
Note that there is some perf drop when using NVRTC due to a known bug of NVRTC which leads to extra instructions (but in the
m=4096,n=2112,k=7168case, NVRTC version was faster, which was a bit strange). So NVCC is kept as the default compiler for now, while NVRTC can be enabled with extra env varDG_JIT_USE_NVRTC.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.