Skip to content

Commit

Permalink
[Graphbolt] Add liburing dependency (dmlc#7149)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
xiangyuzhi and Ubuntu authored Feb 29, 2024
1 parent 73e01d6 commit 0c3a442
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
[submodule "third_party/cccl"]
path = third_party/cccl
url = https://github.com/NVIDIA/cccl.git
[submodule "third_party/liburing"]
path = third_party/liburing
url = https://github.com/axboe/liburing.git
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,23 @@ endif(EXTERNAL_PHMAP_PATH)
target_include_directories(dgl PRIVATE "tensoradapter/include")
target_include_directories(dgl PRIVATE "third_party/pcg/include")


if(CMAKE_SYSTEM_NAME MATCHES "Linux")
include(ExternalProject)
set(LIBURING_INSTALL_DIR ${CMAKE_BINARY_DIR}/third_party/liburing)
ExternalProject_Add(
liburing
SOURCE_DIR ${CMAKE_SOURCE_DIR}/third_party/liburing
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${LIBURING_INSTALL_DIR}
BUILD_COMMAND bash -c "make -j 4"
BUILD_IN_SOURCE ON
INSTALL_COMMAND make install DESTDIR=${LIBURING_INSTALL_DIR}
BUILD_BYPRODUCTS ${LIBURING_INSTALL_DIR}/lib/liburing.a
BUILD_BYPRODUCTS ${LIBURING_INSTALL_DIR}/include
DOWNLOAD_EXTRACT_TIMESTAMP true
)
set(LIBURING_INCLUDE ${LIBURING_INSTALL_DIR}/include)
set(LIBURING ${LIBURING_INSTALL_DIR}/lib/liburing.a)
endif()

if(EXTERNAL_NANOFLANN_PATH)
include_directories(SYSTEM ${EXTERNAL_NANOFLANN_PATH})
Expand Down
2 changes: 2 additions & 0 deletions graphbolt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ if(DEFINED MKL_LIBRARIES)
${MKL_ROOT}/lib/${MKL_ARCH})
endif()

target_include_directories(${LIB_GRAPHBOLT_NAME} PRIVATE ${LIBURING_INCLUDE})
target_link_libraries(${LIB_GRAPHBOLT_NAME} ${LIBURING})
1 change: 1 addition & 0 deletions third_party/liburing
Submodule liburing added at 2e6476

0 comments on commit 0c3a442

Please sign in to comment.