forked from mindspore-Ecosystem/mindspore
!15524 fix the device address set of same output tensor
From: @limingqi107 Reviewed-by: @cristoval,@wilfchen Signed-off-by: @wilfchen
This commit is contained in:
commit
fc140e86ee
|
@ -475,7 +475,7 @@ void GPUSession::UpdateOutputTensors(const VectorRef *outputs,
|
|||
const auto &address = AnfAlgo::GetMutableOutputAddr(node, output_index);
|
||||
// The outputs may have the same tensor, so need skip when the tensor has been set to device address.
|
||||
if ((address == nullptr) || (address->GetPtr() == nullptr)) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
tensor->set_device_address(address);
|
||||
|
||||
|
|
Loading…
Reference in New Issue