Commit 8f9dcabf authored by sangwzh's avatar sangwzh
Browse files

update device compare

parent 097ed7e2
......@@ -107,7 +107,7 @@ class RangePartition : public NDArrayPartition {
// we have only one CPU context, and can safely copy the array to that.
range_cpu_(range.CopyTo(DGLContext{kDGLCPU, 0})) {
auto ctx = range->ctx;
if (ctx.device_type != kDGLCUDA || ctx.device_type != kDGLROCM) {
if (ctx.device_type != kDGLCUDA && ctx.device_type != kDGLROCM) {
LOG(FATAL) << "The range for an NDArrayPartition is only supported "
" on GPUs. Transfer the range to the target device before "
"creating the partition.";
......
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