mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #91] [CLOSED] Refactor JIT compilation (+NVRTC support) #244
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#244
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/91
Author: @lucifer1004
Created: 4/22/2025
Status: ❌ Closed
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
15 files changed (+874 additions, -582 deletions)
View changed files
📝
README.md(+1 -1)📝
deep_gemm/include/deep_gemm/fp8_gemm.cuh(+4 -117)📝
deep_gemm/include/deep_gemm/mma_utils.cuh(+2 -0)➕
deep_gemm/include/deep_gemm/nvrtc_std.cuh(+101 -0)📝
deep_gemm/include/deep_gemm/tma_utils.cuh(+4 -71)📝
deep_gemm/include/deep_gemm/utils.cuh(+6 -0)📝
deep_gemm/jit/__init__.py(+2 -2)📝
deep_gemm/jit/compiler.py(+210 -71)📝
deep_gemm/jit/runtime.py(+80 -32)📝
deep_gemm/jit/template.py(+44 -107)➕
deep_gemm/jit/utils.py(+164 -0)📝
deep_gemm/jit_kernels/gemm.py(+60 -53)📝
deep_gemm/jit_kernels/m_grouped_gemm.py(+74 -62)📝
deep_gemm/jit_kernels/tuner.py(+22 -18)📝
tests/test_jit.py(+100 -48)📄 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.