!13835 fixed memcpy error

From: @anancds
Reviewed-by: @cristoval,@limingqi107
Signed-off-by: @limingqi107
This commit is contained in:
mindspore-ci-bot 2021-03-23 22:20:43 +08:00 committed by Gitee
commit a59f1814c1
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,11 @@ void KernelRuntimeManager::ReleaseKernelRuntime(const std::string &device_name,
if (runtime == nullptr) {
return;
}
#if (ENABLE_CPU && (ENABLE_D || ENABLE_GPU))
if (ps::PSContext::instance()->is_worker() && ps::PsDataPrefetch::GetInstance().cache_enable()) {
ps::ps_cache_instance.SyncEmbeddingTable();
}
#endif
runtime->ReleaseDeviceRes();
runtime_map_.erase(runtime_iter);
}