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
097ed7e2
"torchvision/vscode:/vscode.git/clone" did not exist on "446b2ca571dedaf3c43b2cdc0f299084fd13b93b"
Commit
097ed7e2
authored
Sep 24, 2024
by
sangwzh
Browse files
update cmake for max blocksize and device judge
parent
833803f3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
11 deletions
+4
-11
CMakeLists.txt
CMakeLists.txt
+2
-3
graphbolt/CMakeLists.txt
graphbolt/CMakeLists.txt
+1
-6
src/partition/ndarray_partition.cc
src/partition/ndarray_partition.cc
+1
-1
src/runtime/cuda/cuda_device_api.cc
src/runtime/cuda/cuda_device_api.cc
+0
-1
No files found.
CMakeLists.txt
View file @
097ed7e2
...
@@ -33,6 +33,7 @@ dgl_option(EXTERNAL_METIS_PATH "Path to external metis" OFF)
...
@@ -33,6 +33,7 @@ dgl_option(EXTERNAL_METIS_PATH "Path to external metis" OFF)
dgl_option
(
EXTERNAL_METIS_LIB_PATH
"Path to external metis library"
OFF
)
dgl_option
(
EXTERNAL_METIS_LIB_PATH
"Path to external metis library"
OFF
)
dgl_option
(
EXTERNAL_GKLIB_PATH
"Path to external gklib"
OFF
)
dgl_option
(
EXTERNAL_GKLIB_PATH
"Path to external gklib"
OFF
)
# Options for building DGL features: "none," "dev," "dogfood," "release," and
# Options for building DGL features: "none," "dev," "dogfood," "release," and
# "all."
# "all."
# "none" - The feature is OFF for all build types. This is used when
# "none" - The feature is OFF for all build types. This is used when
...
@@ -275,9 +276,6 @@ file(GLOB_RECURSE DGL_SRC_1
...
@@ -275,9 +276,6 @@ file(GLOB_RECURSE DGL_SRC_1
)
)
list
(
APPEND DGL_SRC
${
DGL_SRC_1
}
)
list
(
APPEND DGL_SRC
${
DGL_SRC_1
}
)
if
(
NOT USE_HIP AND NOT USE_CUDA
)
add_library
(
dgl SHARED
${
DGL_SRC
}
)
endif
()
if
(
NOT MSVC
)
if
(
NOT MSVC
)
file
(
GLOB_RECURSE DGL_RPC_SRC src/rpc/*.cc
)
file
(
GLOB_RECURSE DGL_RPC_SRC src/rpc/*.cc
)
...
@@ -296,6 +294,7 @@ if(USE_HIP)
...
@@ -296,6 +294,7 @@ if(USE_HIP)
set
(
HIP_HIPCC_FLAGS
"-std=c++17"
)
set
(
HIP_HIPCC_FLAGS
"-std=c++17"
)
add_library
(
dgl SHARED
${
DGL_SRC
}
)
add_library
(
dgl SHARED
${
DGL_SRC
}
)
target_link_options
(
dgl PRIVATE
"-Wl,--allow-multiple-definition"
)
target_link_options
(
dgl PRIVATE
"-Wl,--allow-multiple-definition"
)
target_compile_options
(
dgl PUBLIC
"--gpu-max-threads-per-block=1024"
)
# set_target_properties(dgl PROPERTIES LINKER_LANGUAGE hip)
# set_target_properties(dgl PROPERTIES LINKER_LANGUAGE hip)
target_link_libraries
(
dgl
${
DGL_LINKER_LIBS
}
)
target_link_libraries
(
dgl
${
DGL_LINKER_LIBS
}
)
target_include_directories
(
dgl PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/include/dgl"
)
target_include_directories
(
dgl PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/include/dgl"
)
...
...
graphbolt/CMakeLists.txt
View file @
097ed7e2
...
@@ -77,18 +77,13 @@ target_link_libraries(${LIB_GRAPHBOLT_NAME} "${TORCH_LIBRARIES}")
...
@@ -77,18 +77,13 @@ target_link_libraries(${LIB_GRAPHBOLT_NAME} "${TORCH_LIBRARIES}")
if
(
USE_HIP
)
if
(
USE_HIP
)
# set_target_properties(${LIB_GRAPHBOLT_NAME} PROPERTIES CUDA_STANDARD 17)
# set_target_properties(${LIB_GRAPHBOLT_NAME} PROPERTIES CUDA_STANDARD 17)
message
(
STATUS
"Use external CCCL 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_options
(
${
LIB_GRAPHBOLT_NAME
}
PRIVATE
"--gpu-max-threads-per-block=1024"
)
target_include_directories
(
${
LIB_GRAPHBOLT_NAME
}
PRIVATE
target_include_directories
(
${
LIB_GRAPHBOLT_NAME
}
PRIVATE
# # "/opt/dgl_dep/hipcub-install-0915/include/"
# # "/opt/dgl_dep/rocprim-install-0915/include/"
# "${ROCM_PATH}/include/thrust"
# "${ROCM_PATH}/include/thrust"
"
${
ROCM_PATH
}
/include/hipcub"
"
${
ROCM_PATH
}
/include/hipcub"
"
${
ROCM_PATH
}
/include/rocprim"
"
${
ROCM_PATH
}
/include/rocprim"
)
)
# target_include_directories(${LIB_GRAPHBOLT_NAME} PRIVATE
# "../third_party/cccl/thrust"
# "../third_party/cccl/cub"
# "../third_party/cccl/libcudacxx/include")
message
(
STATUS
"Use HugeCTR gpu_cache for graphbolt with INCLUDE_DIRS $ENV{GPU_CACHE_INCLUDE_DIRS}."
)
message
(
STATUS
"Use HugeCTR gpu_cache for graphbolt with INCLUDE_DIRS $ENV{GPU_CACHE_INCLUDE_DIRS}."
)
target_include_directories
(
${
LIB_GRAPHBOLT_NAME
}
PRIVATE $ENV{GPU_CACHE_INCLUDE_DIRS}
)
target_include_directories
(
${
LIB_GRAPHBOLT_NAME
}
PRIVATE $ENV{GPU_CACHE_INCLUDE_DIRS}
)
...
...
src/partition/ndarray_partition.cc
View file @
097ed7e2
...
@@ -107,7 +107,7 @@ class RangePartition : public NDArrayPartition {
...
@@ -107,7 +107,7 @@ class RangePartition : public NDArrayPartition {
// we have only one CPU context, and can safely copy the array to that.
// we have only one CPU context, and can safely copy the array to that.
range_cpu_
(
range
.
CopyTo
(
DGLContext
{
kDGLCPU
,
0
}))
{
range_cpu_
(
range
.
CopyTo
(
DGLContext
{
kDGLCPU
,
0
}))
{
auto
ctx
=
range
->
ctx
;
auto
ctx
=
range
->
ctx
;
if
(
ctx
.
device_type
!=
kDGLCUDA
)
{
if
(
ctx
.
device_type
!=
kDGLCUDA
||
ctx
.
device_type
!=
kDGLROCM
)
{
LOG
(
FATAL
)
<<
"The range for an NDArrayPartition is only supported "
LOG
(
FATAL
)
<<
"The range for an NDArrayPartition is only supported "
" on GPUs. Transfer the range to the target device before "
" on GPUs. Transfer the range to the target device before "
"creating the partition."
;
"creating the partition."
;
...
...
src/runtime/cuda/cuda_device_api.cc
View file @
097ed7e2
...
@@ -74,7 +74,6 @@ class CUDADeviceAPI final : public DeviceAPI {
...
@@ -74,7 +74,6 @@ class CUDADeviceAPI final : public DeviceAPI {
hipDeviceProp_t
props
;
hipDeviceProp_t
props
;
CUDA_CALL
(
hipGetDeviceProperties
(
&
props
,
ctx
.
device_id
));
CUDA_CALL
(
hipGetDeviceProperties
(
&
props
,
ctx
.
device_id
));
*
rv
=
std
::
string
(
props
.
name
);
*
rv
=
std
::
string
(
props
.
name
);
printf
(
"******* debug: device.name:%s
\n
"
,
std
::
string
(
props
.
name
).
c_str
());
return
;
return
;
}
}
case
kMaxClockRate
:
{
case
kMaxClockRate
:
{
...
...
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