A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 4, 08:45 UTC
Revert "[Build] Make bundled DeepGEMM wheel portable across Python versions" (#41512)
Michael Goin committed
May 2, 2026 at 12:42 UTC
0a9362d6ab88eed6fe7b52ed8424794cd492f888
1 file changed
+4
-23
cmake/external_projects/deepgemm.cmake
+4
-23
@@ -59,26 +59,11 @@ if(DEEPGEMM_ARCHS)
59
# Build the _C pybind11 extension from DeepGEMM's C++ source.
60
# This is a CXX-only module — CUDA kernels are JIT-compiled at runtime.
61
#
62
- # Free-threaded Python doesn't yet support the stable ABI, so skip USE_SABI
63
- # there. (The other vLLM extensions get this guard for free via
64
- # define_extension_target; this target uses raw Python_add_library.)
65
- run_python(IS_FREETHREADED_PYTHON
66
- "import sysconfig; print(1 if sysconfig.get_config_var(\"Py_GIL_DISABLED\") else 0)"
67
- "Failed to determine whether interpreter is free-threaded")
68
- if (NOT IS_FREETHREADED_PYTHON)
69
- Python_add_library(_deep_gemm_C MODULE WITH_SOABI USE_SABI 3
70
- "${deepgemm_SOURCE_DIR}/csrc/python_api.cpp")
71
- else()
72
- Python_add_library(_deep_gemm_C MODULE WITH_SOABI
73
- "${deepgemm_SOURCE_DIR}/csrc/python_api.cpp")
74
- endif()
62
+ Python_add_library(_deep_gemm_C MODULE WITH_SOABI
63
+ "${deepgemm_SOURCE_DIR}/csrc/python_api.cpp")
64
65
# The pybind11 module name must be _C to match DeepGEMM's Python imports.
77
- # Place the build artifact in a subdir so it doesn't collide with vLLM's own
78
- # `_C.abi3.so` in the build tree (the install destination still differs).
79
- set_target_properties(_deep_gemm_C PROPERTIES
80
- OUTPUT_NAME "_C"
81
- LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/deep_gemm")
66
+ set_target_properties(_deep_gemm_C PROPERTIES OUTPUT_NAME "_C")
67
68
target_compile_definitions(_deep_gemm_C PRIVATE
69
"-DTORCH_EXTENSION_NAME=_C")
@@ -90,15 +75,11 @@ if(DEEPGEMM_ARCHS)
75
"${deepgemm_SOURCE_DIR}/third-party/cutlass/tools/util/include"
76
"${deepgemm_SOURCE_DIR}/third-party/fmt/include")
77
93
- # Keep Stable ABI for the module, but *not* for CUDA/C++ files.
94
- # This prevents Py_LIMITED_API from affecting nvcc and C++ compiles.
78
target_compile_options(_deep_gemm_C PRIVATE
79
$<$<COMPILE_LANGUAGE:CXX>:-std=c++17>
80
$<$<COMPILE_LANGUAGE:CXX>:-O3>
81
$<$<COMPILE_LANGUAGE:CXX>:-Wno-psabi>
99
- $<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-declarations>
100
- $<$<COMPILE_LANGUAGE:CUDA>:-UPy_LIMITED_API>
101
- $<$<COMPILE_LANGUAGE:CXX>:-UPy_LIMITED_API>)
82
+ $<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-declarations>)
83
84
# torch_python is required because DeepGEMM uses pybind11 type casters
85
# for at::Tensor (via PYBIND11_MODULE), unlike vLLM's own extensions which