Skip to content

Commit

Permalink
[Bug] Update thrust to the new monorepo CCCL (dmlc#6166)
Browse files Browse the repository at this point in the history
Co-authored-by: Rhett Ying <[email protected]>
  • Loading branch information
2 people authored and DominikaJedynak committed Mar 12, 2024
1 parent 09adc7c commit 51747d9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
[submodule "third_party/libxsmm"]
path = third_party/libxsmm
url = https://github.com/hfp/libxsmm.git
[submodule "third_party/thrust"]
path = third_party/thrust
url = https://github.com/NVIDIA/thrust.git
[submodule "third_party/pcg"]
path = third_party/pcg
url = https://github.com/imneme/pcg-cpp.git
[submodule "third_party/cccl"]
path = third_party/cccl
url = https://github.com/NVIDIA/cccl.git
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ if(USE_CUDA)
# see https://github.com/NVIDIA/thrust/issues/1401
add_definitions(-DTHRUST_CUB_WRAPPED_NAMESPACE=dgl)
include(cmake/modules/CUDA.cmake)
message(STATUS "Use external CUB/Thrust library for a consistent API and performance.")
cuda_include_directories(BEFORE "${CMAKE_SOURCE_DIR}/third_party/thrust")
cuda_include_directories(BEFORE "${CMAKE_SOURCE_DIR}/third_party/thrust/dependencies/cub")
cuda_include_directories(BEFORE "${CMAKE_SOURCE_DIR}/third_party/thrust/dependencies/libcudacxx/include")
message(STATUS "Use external CCCL library for a consistent API and performance.")
cuda_include_directories(BEFORE "${CMAKE_SOURCE_DIR}/third_party/cccl/thrust")
cuda_include_directories(BEFORE "${CMAKE_SOURCE_DIR}/third_party/cccl/cub")
cuda_include_directories(BEFORE "${CMAKE_SOURCE_DIR}/third_party/cccl/libcudacxx/include")
endif(USE_CUDA)

# initial variables
Expand Down
8 changes: 4 additions & 4 deletions graphbolt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ target_link_libraries(${LIB_GRAPHBOLT_NAME} "${TORCH_LIBRARIES}")

if(USE_CUDA)
set_target_properties(${LIB_GRAPHBOLT_NAME} PROPERTIES CUDA_STANDARD 17)
message(STATUS "Use external CUB/Thrust library for a consistent API and performance for graphbolt.")
message(STATUS "Use external CCCL library for a consistent API and performance for graphbolt.")
target_compile_definitions(${LIB_GRAPHBOLT_NAME} PRIVATE CUB_WRAPPED_NAMESPACE=graphbolt)
target_compile_definitions(${LIB_GRAPHBOLT_NAME} PRIVATE THRUST_NS_QUALIFIER=thrust)
target_include_directories(${LIB_GRAPHBOLT_NAME} PRIVATE
"../third_party/thrust"
"../third_party/thrust/dependencies/cub"
"../third_party/thrust/dependencies/libcudacxx/include")
"../third_party/cccl/thrust"
"../third_party/cccl/cub"
"../third_party/cccl/libcudacxx/include")
endif()

# The Torch CMake configuration only sets up the path for the MKL library when
Expand Down
2 changes: 1 addition & 1 deletion graphbolt/src/cuda/index_select_impl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#include <c10/core/ScalarType.h>
#include <c10/cuda/CUDAStream.h>

#include <cub/cub.cuh>
#include <numeric>

#include "../index_select.h"
#include "./common.h"
#include "./utils.h"
#include "cub/cub.cuh"

namespace graphbolt {
namespace ops {
Expand Down
1 change: 1 addition & 0 deletions third_party/cccl
Submodule cccl added at 4d5c18
1 change: 0 additions & 1 deletion third_party/thrust
Submodule thrust deleted from 02931a

0 comments on commit 51747d9

Please sign in to comment.