!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:
mindspore-ci-bot 2021-04-23 09:46:47 +08:00 committed by Gitee
commit fc140e86ee
1 changed files with 1 additions and 1 deletions

View File

@ -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);