Browse Source

!29337 Input_node address is not updated in data_prepare_actor if the the address is persistent.

Merge pull request !29337 from caifubi/master-fix-data-prepare-actor-bug
feature/build-system-rewrite
i-robot Gitee 4 years ago
parent
commit
9d20bce3b4
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/ccsrc/runtime/framework/actor/data_prepare_actor.cc

+ 2
- 1
mindspore/ccsrc/runtime/framework/actor/data_prepare_actor.cc View File

@@ -674,7 +674,8 @@ void DataPrepareActor::PrepareDataForWeightNode(const AnfNodePtr &backend_node,
!(host_tensor_address->format() != device_tensor->format() && strategy_ == GraphExecutionStrategy::kStep)) {
// In the scenario of training + inference , the device address of the weight node can not be changed when
// multi-graphs sink mode is set.
if (device_tensor->is_ptr_persisted() && (host_tensor_address != device_tensor)) {
if (device_tensor->is_ptr_persisted() && (host_tensor_address != device_tensor) &&
strategy_ != GraphExecutionStrategy::kStep) {
if (!Copy(device_tensor.get(), host_tensor_address.get())) {
std::string error_info = "Sync data error.";
SET_OPCONTEXT_FAIL_RET_WITH_ERROR_BY_STRATEGY(real_strategy_, (*context), error_info);


Loading…
Cancel
Save