diff --git a/mindspore/ccsrc/runtime/device/ascend/ascend_device_address.cc b/mindspore/ccsrc/runtime/device/ascend/ascend_device_address.cc index 1a87f3e6afe44ed976ecb794c99261f03ae3c011..1b09ef94b65b9d4b16519cd02575e3ef090c0cfd 100644 --- a/mindspore/ccsrc/runtime/device/ascend/ascend_device_address.cc +++ b/mindspore/ccsrc/runtime/device/ascend/ascend_device_address.cc @@ -100,7 +100,7 @@ void AscendDeviceAddress::SyncStream() const { MS_LOG(INFO) << "Start!"; auto ms_context = MsContext::GetInstance(); MS_EXCEPTION_IF_NULL(ms_context); - if (ms_context->execution_mode() != kPynativeMode) { + if (ms_context->execution_mode() != kPynativeMode && !ms_context->enable_pynative_infer()) { MS_LOG(INFO) << "Finish!"; return; }