forked from mindspore-Ecosystem/mindspore
!1966 fix load input data repeatedly in PyNative mode
Merge pull request !1966 from chujinjin/fix_loadinputdata_for_pynative
This commit is contained in:
commit
68d760d5d3
|
@ -686,7 +686,7 @@ void SessionBasic::LoadInputData(const std::shared_ptr<KernelGraph> &kernel_grap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (need_sync) {
|
if (need_sync) {
|
||||||
if (AnfAlgo::IsParameterWeight(pk_node)) {
|
if (ms_context->execution_mode() == kPynativeMode || AnfAlgo::IsParameterWeight(pk_node)) {
|
||||||
tensor->set_device_address(device_address);
|
tensor->set_device_address(device_address);
|
||||||
}
|
}
|
||||||
MS_EXCEPTION_IF_NULL(device_address);
|
MS_EXCEPTION_IF_NULL(device_address);
|
||||||
|
|
Loading…
Reference in New Issue