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: 4 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ FetchContent_Declare(
deepgemm
GIT_REPOSITORY https://github.com/ruoqianguo/DeepGEMM
GIT_TAG 9fa5965e265e27995f539e0dd73a06351a8a9eaf
GIT_SUBMODULES_RECURSE
ON
SOURCE_SUBDIR
dont-add-this-project-with-add-subdirectory)

Expand All @@ -53,6 +55,8 @@ FetchContent_Declare(
flashmla
GIT_REPOSITORY https://github.com/deepseek-ai/FlashMLA.git
GIT_TAG 1408756a88e52a25196b759eaf8db89d2b51b5a1
GIT_SUBMODULES_RECURSE
ON
SOURCE_SUBDIR
dont-add-this-project-with-add-subdirectory)

Expand Down
10 changes: 7 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,18 @@ if(BUILD_DEEP_GEMM)
FetchContent_MakeAvailable(deepgemm)
endif()

if(NOT NVTX_DISABLE)
set(maybe_nvtx_includedir ${CMAKE_BINARY_DIR}/_deps/nvtx-src/include)
endif()

# include as system to suppress warnings
include_directories(
SYSTEM
${CUDAToolkit_INCLUDE_DIRS}
${CUDAToolkit_INCLUDE_DIRS}/cccl
${CUDNN_ROOT_DIR}/include
$<TARGET_PROPERTY:TensorRT::NvInfer,INTERFACE_INCLUDE_DIRECTORIES>
${CMAKE_BINARY_DIR}/_deps/nvtx-src/include
${maybe_nvtx_includedir}
${CMAKE_BINARY_DIR}/_deps/cutlass-src/include
${CMAKE_BINARY_DIR}/_deps/cutlass-src/tools/util/include
${CMAKE_BINARY_DIR}/_deps/json-src/include)
Expand Down Expand Up @@ -494,7 +498,7 @@ print(os.path.dirname(torch.__file__),end='');"
endif()
list(APPEND CMAKE_PREFIX_PATH ${TORCH_DIR})
set(USE_SYSTEM_NVTX ON)
set(nvtx3_dir ${3RDPARTY_DIR}/NVTX/include)
set(nvtx3_dir ${CMAKE_BINARY_DIR}/_deps/nvtx-src/include)
set(CMAKE_CUDA_ARCHITECTURES_BACKUP ${CMAKE_CUDA_ARCHITECTURES})
find_package(Torch REQUIRED)
set(CMAKE_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES_BACKUP})
Expand Down Expand Up @@ -571,7 +575,7 @@ if(ENABLE_UCX)
OUTPUT_VARIABLE UCXX_BUILD_OUTPUT
RESULT_VARIABLE UCXX_BUILD_RESULT)
if(UCXX_BUILD_RESULT)
message("ucxx build:" ${UCXX_BUILD_OUTPUT})
message("ucxx build: ${UCXX_BUILD_OUTPUT}")
message(FATAL_ERROR "ucxx build failed")
endif()
find_package(ucxx REQUIRED PATHS ${CMAKE_BINARY_DIR}/ucxx/build
Expand Down
9 changes: 1 addition & 8 deletions cpp/tensorrt_llm/deep_gemm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,11 @@ endif()
set(DEEP_GEMM_SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/deepgemm-src)
get_filename_component(DEEP_GEMM_SOURCE_DIR ${DEEP_GEMM_SOURCE_DIR} ABSOLUTE)

if(NOT EXISTS ${DEEP_GEMM_SOURCE_DIR})
message(
FATAL_ERROR
"DeepGEMM submodule not found at ${DEEP_GEMM_SOURCE_DIR}. Please run: git submodule update --init --recursive"
)
endif()

# Check if submodules are initialized
if(NOT EXISTS ${DEEP_GEMM_SOURCE_DIR}/third-party/cutlass/include)
message(
FATAL_ERROR
"DeepGEMM submodules not initialized. Please run: git submodule update --init --recursive"
"DeepGEMM submodules not initialized. Something went wrong with FetchContent.\n"
)
endif()

Expand Down
8 changes: 8 additions & 0 deletions cpp/tensorrt_llm/flash_mla/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ endif()
set(FLASH_MLA_SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/flashmla-src)
get_filename_component(FLASH_MLA_SOURCE_DIR ${FLASH_MLA_SOURCE_DIR} ABSOLUTE)

# Check if submodules are initialized
if(NOT EXISTS ${FLASH_MLA_SOURCE_DIR}/csrc/cutlass/include)
message(
FATAL_ERROR
"FlashMLA submodules not initialized. Something went wrong with FetchContent"
)
endif()

# Compiler compatibility for SM100 inline assembly
# =================================================
# FlashMLA SM100 contains PTX inline assembly that Clang++ on ARM64 incorrectly
Expand Down
Loading