This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 42ff98b131 [CMake] Add NCCL/RCCL header directory to include path
(#17422)
42ff98b131 is described below
commit 42ff98b131d7bb146393df80e16bcada4fea4a46
Author: Ruihang Lai <[email protected]>
AuthorDate: Fri Sep 27 10:31:45 2024 -0400
[CMake] Add NCCL/RCCL header directory to include path (#17422)
This PR updates the CMakeList to include the NCCL/RCCL header
directory in the include path of tvm build.
This is necessary when the NCCL/RCCL is installed at the location
covered by the default include pathes. In such cases, TVM is not
able to find the NCCL/RCCL header and cannot have success build.
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66ea6a07da..1fb28c8694 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -471,6 +471,7 @@ endif(USE_PROFILER)
if(USE_CUDA AND USE_NCCL)
message(STATUS "Build with NCCL...")
find_nccl(${USE_NCCL})
+ include_directories(SYSTEM ${NCCL_INCLUDE_DIR})
tvm_file_glob(GLOB RUNTIME_NCCL_SRC src/runtime/disco/nccl/*.cc
src/runtime/disco/cuda_ipc/*.cc 3rdparty/tensorrt_llm/*.cu)
set_source_files_properties(src/runtime/disco/nccl/nccl.cc PROPERTIES
COMPILE_DEFINITIONS "TVM_NCCL_RCCL_SWITCH=0")
list(APPEND RUNTIME_SRCS ${RUNTIME_NCCL_SRC})
@@ -489,6 +490,7 @@ endif()
if(USE_ROCM AND USE_RCCL)
message(STATUS "Build with RCCL...")
find_rccl(${USE_RCCL})
+ include_directories(SYSTEM ${RCCL_INCLUDE_DIR})
tvm_file_glob(GLOB RUNTIME_RCCL_SRC src/runtime/disco/nccl/*.cc)
set_source_files_properties(src/runtime/disco/nccl/nccl.cc PROPERTIES
COMPILE_DEFINITIONS "TVM_NCCL_RCCL_SWITCH=1")
list(APPEND RUNTIME_SRCS ${RUNTIME_RCCL_SRC})