Skip to content

Commit d09d172

Browse files
committed
Move thirdparty stuff to it's own listfile
In this change we consolidate all third party code registrations into a the common file 3rdparty/CMakeLists.txt using cmake's FetchContent API. This helps to streamline both the process of adding new dependencies, as well as the process of auditing and tracing those dependencies. Because FetchContent_Declare doesn't actually add rules to the build, we can conveniently register all third party dependencies in this one place regardless of whether or not that dependency is integrated or enabled for a particular build. Because several third party dependencies are moved to this build-time fetching, they are also removed as git submodules in this change. Signed-off-by: Josh Bialkowski <[email protected]>
1 parent d4abb86 commit d09d172

File tree

26 files changed

+171
-128
lines changed

26 files changed

+171
-128
lines changed

.gitmodules

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +0,0 @@
1-
[submodule "3rdparty/cutlass"]
2-
path = 3rdparty/cutlass
3-
url = https://github.com/NVIDIA/cutlass.git
4-
[submodule "3rdparty/json"]
5-
path = 3rdparty/json
6-
url = https://github.com/nlohmann/json.git
7-
[submodule "3rdparty/cxxopts"]
8-
path = 3rdparty/cxxopts
9-
url = https://github.com/jarro2783/cxxopts
10-
branch = v3.1.1
11-
[submodule "3rdparty/NVTX"]
12-
path = 3rdparty/NVTX
13-
url = https://github.com/NVIDIA/NVTX.git
14-
[submodule "3rdparty/ucxx"]
15-
path = 3rdparty/ucxx
16-
url = https://github.com/rapidsai/ucxx.git
17-
[submodule "3rdparty/pybind11"]
18-
path = 3rdparty/pybind11
19-
url = https://github.com/pybind/pybind11.git
20-
[submodule "3rdparty/xgrammar"]
21-
path = 3rdparty/xgrammar
22-
url = https://github.com/mlc-ai/xgrammar.git
23-
[submodule "3rdparty/nanobind"]
24-
path = 3rdparty/nanobind
25-
url = https://github.com/wjakob/nanobind
26-
[submodule "3rdparty/cppzmq"]
27-
path = 3rdparty/cppzmq
28-
url = https://github.com/zeromq/cppzmq.git
29-
[submodule "3rdparty/DeepGEMM"]
30-
path = 3rdparty/DeepGEMM
31-
url = https://github.com/ruoqianguo/DeepGEMM.git
32-
branch = swapab_sm100
33-
[submodule "3rdparty/flash-mla"]
34-
path = 3rdparty/flash-mla
35-
url = https://github.com/deepseek-ai/FlashMLA.git

3rdparty/CMakeLists.txt

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
include(ExternalProject)
2+
include(FetchContent)
3+
4+
if(DEFINED ENV{GITHUB_MIRROR} AND NOT "$ENV{GITHUB_MIRROR}" STREQUAL "")
5+
set(github_base_url "$ENV{GITHUB_MIRROR}")
6+
else()
7+
set(github_base_url "https://github.com")
8+
endif()
9+
10+
FetchContent_Declare(
11+
cppzmq
12+
GIT_REPOSITORY https://github.com/zeromq/cppzmq
13+
GIT_TAG v4.10.0 # c94c20743ed7d4aa37835a5c46567ab0790d4acc
14+
GIT_SHALLOW TRUE
15+
# NOTE: TensorRT-LLM only uses the headers
16+
SOURCE_SUBDIR
17+
dont-add-this-project-with-add-subdirectory)
18+
19+
FetchContent_Declare(
20+
cutlass
21+
GIT_REPOSITORY https://github.com/NVIDIA/cutlass
22+
GIT_TAG v4.2.1 # f3fde58372d33e9a5650ba7b80fc48b3b49d40c8
23+
GIT_SHALLOW TRUE
24+
SOURCE_SUBDIR
25+
dont-add-this-project-with-add-subdirectory)
26+
27+
FetchContent_Declare(
28+
cxxopts
29+
GIT_REPOSITORY https://github.com/jarro2783/cxxopts
30+
GIT_TAG v3.1.1 # eb787304d67ec22f7c3a184ee8b4c481d04357fd
31+
GIT_SHALLOW TRUE)
32+
33+
set(deep_ep_commit 5be51b228a7c82dbdb213ea58e77bffd12b38af8)
34+
set_property(GLOBAL PROPERTY DEEP_EP_COMMIT "${deep_ep_commit}")
35+
FetchContent_Declare(
36+
deep_ep_download
37+
URL ${github_base_url}/deepseek-ai/DeepEP/archive/${deep_ep_commit}.tar.gz)
38+
39+
FetchContent_Declare(
40+
deepgemm
41+
GIT_REPOSITORY https://github.com/ruoqianguo/DeepGEMM
42+
GIT_TAG 9fa5965e265e27995f539e0dd73a06351a8a9eaf
43+
SOURCE_SUBDIR
44+
dont-add-this-project-with-add-subdirectory)
45+
46+
FetchContent_Declare(
47+
eigen
48+
GIT_REPOSITORY https://github.com/libeigen/eigen
49+
GIT_TAG 3.4.0
50+
GIT_SHALLOW TRUE)
51+
52+
FetchContent_Declare(
53+
flashmla
54+
GIT_REPOSITORY https://github.com/deepseek-ai/FlashMLA.git
55+
GIT_TAG 1408756a88e52a25196b759eaf8db89d2b51b5a1
56+
SOURCE_SUBDIR
57+
dont-add-this-project-with-add-subdirectory)
58+
59+
FetchContent_Declare(
60+
googlebenchmark
61+
GIT_REPOSITORY https://github.com/google/benchmark
62+
GIT_TAG v1.8.3
63+
GIT_SHALLOW TRUE)
64+
65+
FetchContent_Declare(
66+
googletest
67+
GIT_REPOSITORY https://github.com/google/googletest
68+
GIT_TAG v1.15.2
69+
GIT_SHALLOW TRUE)
70+
71+
FetchContent_Declare(
72+
json
73+
GIT_REPOSITORY https://github.com/nlohmann/json
74+
GIT_TAG v3.12.0 # 55f93686c01528224f448c19128836e7df245f72
75+
GIT_SHALLOW TRUE
76+
SOURCE_SUBDIR
77+
dont-add-this-project-with-add-subdirectory)
78+
79+
FetchContent_Declare(
80+
nanobind
81+
GIT_REPOSITORY https://github.com/wjakob/nanobind
82+
GIT_TAG a0ed2587f1089ef7657e2ed49ad6756b01c74e9f)
83+
84+
FetchContent_Declare(
85+
nvtx
86+
GIT_REPOSITORY https://github.com/NVIDIA/NVTX
87+
GIT_TAG v3.1.0-c-cpp # a1ceb0677f67371ed29a2b1c022794f077db5fe7
88+
GIT_SHALLOW TRUE
89+
# NOTE: TensorRT-LLM only uses the headers
90+
SOURCE_SUBDIR
91+
dont-add-this-project-with-add-subdirectory)
92+
93+
FetchContent_Declare(
94+
pybind11
95+
GIT_REPOSITORY https://github.com/pybind/pybind11
96+
GIT_TAG f99ffd7e03001810a3e722bf48ad1a9e08415d7d)
97+
98+
FetchContent_Declare(
99+
ucxx
100+
GIT_REPOSITORY https://github.com/rapidsai/ucxx
101+
GIT_TAG 16eaa57c8d98c8ef54d666a2d2b11e76cfa565f5
102+
# NOTE: See the notes in cpp/CMakeList.txt where this project is build at
103+
# configure time and then included via find_package
104+
SOURCE_SUBDIR
105+
dont-add-this-project-with-add-subdirectory)
106+
107+
FetchContent_Declare(
108+
xgrammar
109+
GIT_REPOSITORY https://github.com/mlc-ai/xgrammar
110+
GIT_TAG v0.1.25 # e4e816f5f0fe39f5b1601a17a4552307fa3b70ff
111+
GIT_SHALLOW TRUE
112+
# NOTE: TensorRT-LLM only uses the headers
113+
SOURCE_SUBDIR
114+
dont-add-this-project-with-add-subdirectory)

3rdparty/DeepGEMM

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/NVTX

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/cppzmq

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/cutlass

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/cxxopts

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/flash-mla

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/json

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/nanobind

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)