Commit fa71fb44 authored by lisj's avatar lisj
Browse files

修复c++测试用例中有关于kDLROCM的问题

parent c6067cc4
...@@ -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{kDLGPU, 0}; static constexpr DLContext GPU = DLContext{kDLROCM, 0};
#endif #endif
template <typename T> template <typename T>
......
...@@ -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<kDLGPU, int32_t>(); _TestRemainder_GeneratePermutation<kDLROCM, int32_t>();
_TestRemainder_GeneratePermutation<kDLGPU, int64_t>(); _TestRemainder_GeneratePermutation<kDLROCM, int64_t>();
_TestRemainder_MapToX<kDLGPU, int32_t>(); _TestRemainder_MapToX<kDLROCM, int32_t>();
_TestRemainder_MapToX<kDLGPU, int64_t>(); _TestRemainder_MapToX<kDLROCM, 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<kDLGPU, int32_t>(); _TestRange_GeneratePermutation<kDLROCM, int32_t>();
_TestRange_GeneratePermutation<kDLGPU, int64_t>(); _TestRange_GeneratePermutation<kDLROCM, int64_t>();
_TestRange_MapToX<kDLGPU, int32_t>(); _TestRange_MapToX<kDLROCM, int32_t>();
_TestRange_MapToX<kDLGPU, int64_t>(); _TestRange_MapToX<kDLROCM, int64_t>();
#endif #endif
// CPU is not implemented // CPU is not implemented
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment