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
314cedc1
Commit
314cedc1
authored
Feb 20, 2025
by
sangwz
Browse files
dtk 2504 update
parent
0d56855b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
CMakeLists.txt
CMakeLists.txt
+1
-1
dgl_sparse/CMakeLists.txt
dgl_sparse/CMakeLists.txt
+4
-2
graphbolt/src/cuda/neighbor_sampler.hip
graphbolt/src/cuda/neighbor_sampler.hip
+2
-1
src/array/cuda/bf16.cuh
src/array/cuda/bf16.cuh
+3
-1
No files found.
CMakeLists.txt
View file @
314cedc1
...
@@ -157,7 +157,7 @@ if(USE_HIP)
...
@@ -157,7 +157,7 @@ if(USE_HIP)
project
(
dgl C CXX HIP
)
project
(
dgl C CXX HIP
)
include
(
cmake/modules/ROCM.cmake
)
include
(
cmake/modules/ROCM.cmake
)
# target_compile_features(dgl PRIVATE cxx_std_17)
# target_compile_features(dgl PRIVATE cxx_std_17)
set
(
CMAKE_HIP_ARCHITECTURES gfx906;gfx928;gfx926
)
set
(
CMAKE_HIP_ARCHITECTURES gfx906;gfx928;gfx926
;gfx936
)
# see https://github.com/NVIDIA/thrust/issues/1401
# see https://github.com/NVIDIA/thrust/issues/1401
if
(
NOT DEFINED ENV{ROCM_PATH}
)
if
(
NOT DEFINED ENV{ROCM_PATH}
)
set
(
ROCM_PATH
"/opt/dtk"
CACHE PATH
"Path to which RoCm has been installed"
)
set
(
ROCM_PATH
"/opt/dtk"
CACHE PATH
"Path to which RoCm has been installed"
)
...
...
dgl_sparse/CMakeLists.txt
View file @
314cedc1
...
@@ -21,10 +21,12 @@ list(GET TORCH_VERSION_LIST 0 TORCH_VERSION_MAJOR)
...
@@ -21,10 +21,12 @@ list(GET TORCH_VERSION_LIST 0 TORCH_VERSION_MAJOR)
list
(
GET TORCH_VERSION_LIST 1 TORCH_VERSION_MINOR
)
list
(
GET TORCH_VERSION_LIST 1 TORCH_VERSION_MINOR
)
set
(
SPARSE_LINKER_LIBS
""
)
set
(
SPARSE_LINKER_LIBS
""
)
list
(
APPEND CMAKE_PREFIX_PATH $ENV{ROCM_PATH}
)
set
(
HIP_PATH $ENV{ROCM_PATH}/hip
)
if
(
USE_CUDA OR USE_HIP
)
if
(
USE_CUDA OR USE_HIP
)
project
(
dgl_sparse C CXX HIP
)
add_definitions
(
-DDGL_USE_CUDA
)
add_definitions
(
-DDGL_USE_CUDA
)
enable_language
(
HIP
)
find_package
(
HIP REQUIRED PATHS
${
HIP_PATH
}
NO_DEFAULT_PATH
)
endif
()
endif
()
# For windows, define NOMINMAX to avoid conflict with std::min/max
# For windows, define NOMINMAX to avoid conflict with std::min/max
...
...
graphbolt/src/cuda/neighbor_sampler.hip
View file @
314cedc1
...
@@ -45,11 +45,12 @@ struct radix_key_codec_base<__hip_bfloat16> : radix_key_codec_floating<__hip_bfl
...
@@ -45,11 +45,12 @@ struct radix_key_codec_base<__hip_bfloat16> : radix_key_codec_floating<__hip_bfl
};
};
}
}
}
}
#if HIP_VERSION_MAJOR<6
__host__ __device__ bool operator>(const __hip_bfloat16& a, const __hip_bfloat16& b)
__host__ __device__ bool operator>(const __hip_bfloat16& a, const __hip_bfloat16& b)
{
{
return float(a)>float(b);
return float(a)>float(b);
}
}
#endif
namespace graphbolt {
namespace graphbolt {
namespace ops {
namespace ops {
...
...
src/array/cuda/bf16.cuh
View file @
314cedc1
...
@@ -43,7 +43,7 @@ min(__hip_bfloat16 a, __hip_bfloat16 b) {
...
@@ -43,7 +43,7 @@ min(__hip_bfloat16 a, __hip_bfloat16 b) {
#endif
#endif
}
}
#if
def __HIPCC__
#if
HIP_VERSION_MAJOR < 6
// Arithmetic BF16 operations for architecture >= 8.0 are already defined in
// Arithmetic BF16 operations for architecture >= 8.0 are already defined in
// hip/__hip_bfloat16.h
// hip/__hip_bfloat16.h
// #if defined(__DTK_ARCH__) && (__DTK_ARCH__ < 800)
// #if defined(__DTK_ARCH__) && (__DTK_ARCH__ < 800)
...
@@ -143,6 +143,8 @@ __device__ __forceinline__ bool operator<=(
...
@@ -143,6 +143,8 @@ __device__ __forceinline__ bool operator<=(
}
}
// #endif // defined(DTKRT_VERSION) && (DTKRT_VERSION < 12020)
// #endif // defined(DTKRT_VERSION) && (DTKRT_VERSION < 12020)
// #endif // defined(__DTK_ARCH__) && (__DTK_ARCH__ < 800)
// #endif // defined(__DTK_ARCH__) && (__DTK_ARCH__ < 800)
#endif
#if __HIPCC__
__device__
__device__
inline
inline
__hip_bfloat16
__shfl_down
(
__hip_bfloat16
var
,
unsigned
int
lane_delta
,
int
width
=
warpSize
)
{
__hip_bfloat16
__shfl_down
(
__hip_bfloat16
var
,
unsigned
int
lane_delta
,
int
width
=
warpSize
)
{
...
...
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