Browse Source

!15524 fix the device address set of same output tensor

From: @limingqi107
Reviewed-by: @cristoval,@wilfchen
Signed-off-by: @wilfchen
pull/15524/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
fc140e86ee
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/session/gpu_session.cc

+ 1
- 1
mindspore/ccsrc/backend/session/gpu_session.cc 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);



Loading…
Cancel
Save