Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ set(TRT_LIB TensorRT::NvInfer)
get_filename_component(TRT_LLM_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} PATH)

set(3RDPARTY_DIR ${TRT_LLM_ROOT_DIR}/3rdparty)
if(BINDING_TYPE STREQUAL "pybind" OR BUILD_DEEP_EP)
if(BINDING_TYPE STREQUAL "pybind")
add_subdirectory(${3RDPARTY_DIR}/pybind11
${CMAKE_CURRENT_BINARY_DIR}/pybind11)
endif()
Expand All @@ -217,7 +217,7 @@ include_directories(
${3RDPARTY_DIR}/cutlass/tools/util/include
${3RDPARTY_DIR}/NVTX/include
${3RDPARTY_DIR}/json/include)
if(BINDING_TYPE STREQUAL "pybind" OR BUILD_DEEP_EP)
if(BINDING_TYPE STREQUAL "pybind")
include_directories(${3RDPARTY_DIR}/pybind11/include)
endif()
if(BINDING_TYPE STREQUAL "nanobind")
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/tensorrt_llm/batch_manager/runtimeBuffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class RuntimeBuffers

public:
//! Additional buffers depending on model type
std::shared_ptr<TransformerBuffers> transformerBuffers;
std::unique_ptr<TransformerBuffers> transformerBuffers;
std::unique_ptr<RnnStateBuffers> rnnStateBuffers;

//! Encoder-Decoder
Expand Down
2 changes: 1 addition & 1 deletion cpp/tensorrt_llm/batch_manager/runtimeBuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void RuntimeBuffers::create(SizeType32 maxBatchSize, SizeType32 maxBeamWidth,

if (modelConfig.isTransformerBased())
{
transformerBuffers = std::make_shared<TransformerBuffers>(maxBatchSize, maxBeamWidth, maxAttentionWindowVec,
transformerBuffers = std::make_unique<TransformerBuffers>(maxBatchSize, maxBeamWidth, maxAttentionWindowVec,
maxAttentionWindow, sinkTokenLen, runtime, modelConfig, worldConfig);
}
if (modelConfig.isRnnBased())
Expand Down
37 changes: 6 additions & 31 deletions cpp/tensorrt_llm/nanobind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,7 @@ set(TRTLLM_NB_MODULE
${TRTLLM_NB_MODULE}
PARENT_SCOPE)

set(SRCS
batch_manager/algorithms.cpp
batch_manager/bindings.cpp
batch_manager/buffers.cpp
batch_manager/cacheTransceiver.cpp
batch_manager/kvCacheManager.cpp
batch_manager/llmRequest.cpp
executor/bindings.cpp
executor/executor.cpp
executor/executorConfig.cpp
executor/request.cpp
runtime/bindings.cpp
testing/modelSpecBinding.cpp
runtime/moeBindings.cpp
userbuffers/bindings.cpp
../runtime/ipcNvlsMemory.cu
bindings.cpp)
set(SRCS ../runtime/ipcNvlsMemory.cu bindings.cpp)

include_directories(${PROJECT_SOURCE_DIR}/include)

Expand All @@ -30,29 +14,20 @@ set_property(TARGET ${TRTLLM_NB_MODULE} PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_directories(${TRTLLM_NB_MODULE} PUBLIC
"${TORCH_INSTALL_PREFIX}/lib")

if(ENABLE_NVSHMEM)
target_link_libraries(${TRTLLM_NB_MODULE} PUBLIC nvshmem::nvshmem_host
nvshmem::nvshmem_device)
endif()

target_link_libraries(
${TRTLLM_NB_MODULE}
PUBLIC ${SHARED_TARGET}
${UNDEFINED_FLAG}
${NO_AS_NEEDED_FLAG}
${Python3_LIBRARIES}
${TORCH_LIBRARIES}
torch_python
${CUDA_NVML_LIB})
PUBLIC ${SHARED_TARGET} ${UNDEFINED_FLAG} ${NO_AS_NEEDED_FLAG}
${Python3_LIBRARIES} ${TORCH_LIBRARIES} torch_python)

target_compile_definitions(
${TRTLLM_NB_MODULE} PUBLIC TRTLLM_NB_MODULE=${TRTLLM_NB_MODULE}
PYBIND11_DETAILED_ERROR_MESSAGES=1)
NB_DETAILED_ERROR_MESSAGES=1)

if(NOT WIN32)
set_target_properties(
${TRTLLM_NB_MODULE}
PROPERTIES
LINK_FLAGS
"-Wl,-rpath,'$ORIGIN/libs' -Wl,-rpath,'$ORIGIN/../nvidia/nccl/lib' -Wl,-rpath,'${CUDA_TOOLKIT_ROOT_DIR}/targets/x86_64-linux/lib/stubs' ${AS_NEEDED_FLAG} ${UNDEFINED_FLAG}"
"-Wl,-rpath,'$ORIGIN/libs' -Wl,-rpath,'$ORIGIN/../nvidia/nccl/lib' ${AS_NEEDED_FLAG} ${UNDEFINED_FLAG}"
)
endif()
178 changes: 0 additions & 178 deletions cpp/tensorrt_llm/nanobind/batch_manager/algorithms.cpp

This file was deleted.

29 changes: 0 additions & 29 deletions cpp/tensorrt_llm/nanobind/batch_manager/algorithms.h

This file was deleted.

Loading