"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "91db978bb14ab3ef818c0b75036465fdb3a2fa0b"
Commit 8f9dcabf authored by sangwzh's avatar sangwzh
Browse files

update device compare

parent 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 || ctx.device_type != kDGLROCM) { 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.";
......
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