Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
4795e163
Unverified
Commit
4795e163
authored
Nov 30, 2023
by
Muhammed Fatih BALIN
Committed by
GitHub
Nov 30, 2023
Browse files
[Graphbolt][CUDA] Add third_party thrust and cub dependency (#6650)
parent
47898ab6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
graphbolt/CMakeLists.txt
graphbolt/CMakeLists.txt
+8
-0
No files found.
graphbolt/CMakeLists.txt
View file @
4795e163
...
@@ -3,6 +3,7 @@ project(graphbolt C CXX)
...
@@ -3,6 +3,7 @@ project(graphbolt C CXX)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD 17
)
if
(
USE_CUDA
)
if
(
USE_CUDA
)
message
(
STATUS
"Build graphbolt with CUDA support"
)
enable_language
(
CUDA
)
enable_language
(
CUDA
)
add_definitions
(
-DGRAPHBOLT_USE_CUDA
)
add_definitions
(
-DGRAPHBOLT_USE_CUDA
)
endif
()
endif
()
...
@@ -59,6 +60,13 @@ target_link_libraries(${LIB_GRAPHBOLT_NAME} "${TORCH_LIBRARIES}")
...
@@ -59,6 +60,13 @@ target_link_libraries(${LIB_GRAPHBOLT_NAME} "${TORCH_LIBRARIES}")
if
(
USE_CUDA
)
if
(
USE_CUDA
)
set_target_properties
(
${
LIB_GRAPHBOLT_NAME
}
PROPERTIES CUDA_STANDARD 17
)
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."
)
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"
)
endif
()
endif
()
# The Torch CMake configuration only sets up the path for the MKL library when
# The Torch CMake configuration only sets up the path for the MKL library when
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment