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
fa71fb44
Commit
fa71fb44
authored
Oct 10, 2023
by
lisj
Browse files
修复c++测试用例中有关于kDLROCM的问题
parent
c6067cc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
tests/cpp/common.h
tests/cpp/common.h
+1
-1
tests/cpp/test_partition.cc
tests/cpp/test_partition.cc
+8
-8
No files found.
tests/cpp/common.h
View file @
fa71fb44
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
static
constexpr
DLContext
CTX
=
DLContext
{
kDLCPU
,
0
};
static
constexpr
DLContext
CTX
=
DLContext
{
kDLCPU
,
0
};
static
constexpr
DLContext
CPU
=
DLContext
{
kDLCPU
,
0
};
static
constexpr
DLContext
CPU
=
DLContext
{
kDLCPU
,
0
};
#ifdef DGL_USE_CUDA
#ifdef DGL_USE_CUDA
static
constexpr
DLContext
GPU
=
DLContext
{
kDL
GPU
,
0
};
static
constexpr
DLContext
GPU
=
DLContext
{
kDL
ROCM
,
0
};
#endif
#endif
template
<
typename
T
>
template
<
typename
T
>
...
...
tests/cpp/test_partition.cc
View file @
fa71fb44
...
@@ -80,11 +80,11 @@ void _TestRemainder_MapToX() {
...
@@ -80,11 +80,11 @@ void _TestRemainder_MapToX() {
TEST
(
PartitionTest
,
TestRemainderPartition
)
{
TEST
(
PartitionTest
,
TestRemainderPartition
)
{
#ifdef DGL_USE_CUDA
#ifdef DGL_USE_CUDA
_TestRemainder_GeneratePermutation
<
kDL
GPU
,
int32_t
>
();
_TestRemainder_GeneratePermutation
<
kDL
ROCM
,
int32_t
>
();
_TestRemainder_GeneratePermutation
<
kDL
GPU
,
int64_t
>
();
_TestRemainder_GeneratePermutation
<
kDL
ROCM
,
int64_t
>
();
_TestRemainder_MapToX
<
kDL
GPU
,
int32_t
>
();
_TestRemainder_MapToX
<
kDL
ROCM
,
int32_t
>
();
_TestRemainder_MapToX
<
kDL
GPU
,
int64_t
>
();
_TestRemainder_MapToX
<
kDL
ROCM
,
int64_t
>
();
#endif
#endif
// CPU is not implemented
// CPU is not implemented
}
}
...
@@ -189,11 +189,11 @@ void _TestRange_MapToX() {
...
@@ -189,11 +189,11 @@ void _TestRange_MapToX() {
TEST
(
PartitionTest
,
TestRangePartition
)
{
TEST
(
PartitionTest
,
TestRangePartition
)
{
#ifdef DGL_USE_CUDA
#ifdef DGL_USE_CUDA
_TestRange_GeneratePermutation
<
kDL
GPU
,
int32_t
>
();
_TestRange_GeneratePermutation
<
kDL
ROCM
,
int32_t
>
();
_TestRange_GeneratePermutation
<
kDL
GPU
,
int64_t
>
();
_TestRange_GeneratePermutation
<
kDL
ROCM
,
int64_t
>
();
_TestRange_MapToX
<
kDL
GPU
,
int32_t
>
();
_TestRange_MapToX
<
kDL
ROCM
,
int32_t
>
();
_TestRange_MapToX
<
kDL
GPU
,
int64_t
>
();
_TestRange_MapToX
<
kDL
ROCM
,
int64_t
>
();
#endif
#endif
// CPU is not implemented
// CPU is not implemented
}
}
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