forked from mindspore-Ecosystem/mindspore
!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
This commit is contained in:
commit
9d20bce3b4
|
@ -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…
Reference in New Issue