vllm - 💡(How to fix) Fix [Build] DeepGEMM wheel integration: planned cleanups

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Today's per-Python machinery exists because DeepGEMM's binding uses PYBIND11_MODULE, which inevitably links private CPython symbols (_PyObject_GetDictPtr, _PyThreadState_UncheckedGet, etc.) — so the .so is Python-version-coupled regardless of file naming.

RAW_BUFFERClick to expand / collapse

🚀 The feature, motivation and pitch

Tracking issue for cleanups to the vendored DeepGEMM build path. Companion to upstream DeepGEMM's issue https://github.com/deepseek-ai/DeepGEMM/issues/333

Current state

vLLM bundles DeepGEMM under vllm/third_party/deep_gemm/ and ships a _C.cpython-X.Y-*.so for every CPython covered by requires-python, all side-by-side in the wheel. Python's loader picks the right one at import. The build is in cmake/external_projects/deepgemm.cmake and tools/build_deepgemm_C.py.

This shape was settled on after the single-_C.abi3.so approach was tried and reverted (see #41476 / #41512); landed in #41516.

What we'd like to clean up

1. Collapse the per-Python _C build down to a single _C.abi3.so.

Today's per-Python machinery exists because DeepGEMM's binding uses PYBIND11_MODULE, which inevitably links private CPython symbols (_PyObject_GetDictPtr, _PyThreadState_UncheckedGet, etc.) — so the .so is Python-version-coupled regardless of file naming.

Two paths to fix:

Either path eliminates tools/build_deepgemm_C.py, tools/setup_deepgemm_pythons.sh, tools/check_wheel_deepgemm.py, the per-Python foreach in deepgemm.cmake, and the DEEPGEMM_PYTHON_INTERPRETERS plumbing in the Dockerfile.

2. AOT-compile DeepGEMM's CUDA kernels.

DeepGEMM currently JIT-compiles its kernels at runtime, which is why we vendor CUTLASS + CCCL + DeepGEMM headers under vllm/third_party/deep_gemm/include/. That's several MB of wheel size and a hard runtime dependency on a CUDA toolkit being present on the host.

Switching to AOT compilation would let us drop the vendored headers and the toolkit-at-runtime requirement. Requires upstream changes.

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Build] DeepGEMM wheel integration: planned cleanups