Skip to content

Commit 50890e4

Browse files
committed
Remove binding_type support
Signed-off-by: Linda-Stadter <[email protected]>
1 parent 2fd907a commit 50890e4

File tree

7 files changed

+29
-365
lines changed

7 files changed

+29
-365
lines changed

cpp/CMakeLists.txt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ endif()
8383
add_compile_definitions("TLLM_GEN_EXPORT_INTERFACE")
8484
add_compile_definitions("TLLM_ENABLE_CUDA")
8585

86-
set(BINDING_TYPE
87-
"nanobind"
88-
CACHE STRING
89-
"Binding type of Python bindings for C++ runtime and batch manager")
90-
9186
set(INTERNAL_CUTLASS_KERNELS_PATH
9287
""
9388
CACHE
@@ -246,16 +241,15 @@ get_filename_component(TRT_LLM_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} PATH)
246241
set(3RDPARTY_DIR ${TRT_LLM_ROOT_DIR}/3rdparty)
247242
add_subdirectory(${3RDPARTY_DIR} 3rdparty)
248243

249-
if(BINDING_TYPE STREQUAL "pybind"
250-
OR BUILD_DEEP_EP
251-
OR BUILD_DEEP_GEMM)
244+
if(BUILD_DEEP_EP
245+
OR BUILD_DEEP_GEMM
246+
OR BUILD_FLASH_MLA)
252247
FetchContent_MakeAvailable(pybind11)
253248
include_directories(${CMAKE_BINARY_DIR}/_deps/pybind11-src/include)
254249
endif()
255-
if(BINDING_TYPE STREQUAL "nanobind")
256-
FetchContent_MakeAvailable(nanobind)
257-
include_directories(${CMAKE_BINARY_DIR}/_deps/nanobind-src/include)
258-
endif()
250+
251+
FetchContent_MakeAvailable(nanobind)
252+
include_directories(${CMAKE_BINARY_DIR}/_deps/nanobind-src/include)
259253

260254
FetchContent_MakeAvailable(cutlass cxxopts flashmla json xgrammar)
261255

cpp/tensorrt_llm/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,7 @@ if(BUILD_PYT)
293293
add_subdirectory(thop)
294294
endif()
295295

296-
if(BINDING_TYPE STREQUAL "pybind")
297-
add_subdirectory(pybind)
298-
endif()
299-
300-
if(BINDING_TYPE STREQUAL "nanobind")
301-
add_subdirectory(nanobind)
302-
endif()
296+
add_subdirectory(nanobind)
303297

304298
if(BUILD_DEEP_EP)
305299
add_subdirectory(deep_ep)

cpp/tensorrt_llm/executor/cache_transmission/nixl_utils/CMakeLists.txt

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,10 @@ if(NIXL_ENABLED OR MOONCAKE_ENABLED)
6565

6666
# Collect binding source files
6767
set(AGENT_BINDING_SOURCES "")
68-
if(BINDING_TYPE STREQUAL "pybind")
69-
list(APPEND AGENT_BINDING_SOURCES agentBindingsPybind.cpp)
70-
else()
71-
list(APPEND AGENT_BINDING_SOURCES agentBindingsNanobind.cpp)
72-
endif()
68+
list(APPEND AGENT_BINDING_SOURCES agentBindings.cpp)
7369

74-
if(BINDING_TYPE STREQUAL "pybind")
75-
# Use pybind11 (already fetched via FetchContent)
76-
pybind11_add_module(${TRANSFER_AGENT_BINDING_TARGET}
77-
${AGENT_BINDING_SOURCES})
78-
message(STATUS "Building tensorrt_llm_transfer_agent_binding with pybind11")
79-
else()
80-
# Default to nanobind (already fetched via FetchContent)
81-
nanobind_add_module(${TRANSFER_AGENT_BINDING_TARGET}
82-
${AGENT_BINDING_SOURCES})
83-
message(STATUS "Building tensorrt_llm_transfer_agent_binding with nanobind")
84-
endif()
70+
nanobind_add_module(${TRANSFER_AGENT_BINDING_TARGET} ${AGENT_BINDING_SOURCES})
71+
message(STATUS "Building tensorrt_llm_transfer_agent_binding with nanobind")
8572

8673
target_compile_options(${TRANSFER_AGENT_BINDING_TARGET} PRIVATE -Wno-error)
8774

cpp/tensorrt_llm/executor/cache_transmission/nixl_utils/agentBindingsNanobind.cpp renamed to cpp/tensorrt_llm/executor/cache_transmission/nixl_utils/agentBindings.cpp

File renamed without changes.

cpp/tensorrt_llm/executor/cache_transmission/nixl_utils/agentBindingsPybind.cpp

Lines changed: 0 additions & 234 deletions
This file was deleted.

cpp/tensorrt_llm/nanobind/bindings.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ tr::SamplingConfig makeSamplingConfig(std::vector<tr::SamplingConfig> const& con
8080
NB_MODULE(TRTLLM_NB_MODULE, m)
8181
{
8282
m.doc() = "TensorRT LLM Python bindings for C++ runtime";
83-
m.attr("binding_type") = "nanobind";
8483
nb::set_leak_warnings(false);
8584

8685
// Create MpiComm binding first since it's used in the executor bindings

0 commit comments

Comments
 (0)