diff --git a/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc b/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc index 1b44394ce0..77389f16e5 100644 --- a/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc +++ b/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc @@ -162,6 +162,7 @@ tensor::TensorPtr CPUKernelRuntime::CreatTensorForOutput(session::KernelGraph *k tensor->set_device_address(address); need_sync_outputs->emplace_back(tensor); } else { + tensor->set_device_address(nullptr); address->ptr_ = tensor->data_c(); } address->ref_count_ = INIT_NODE_REF;