!45041 check mindpsore_gpu.dll exist

Merge pull request !45041 from qiuzhongya/msvc8
This commit is contained in:
i-robot 2022-11-03 06:19:41 +00:00 committed by Gitee
commit a95f7995d2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 1 deletions

View File

@ -159,7 +159,9 @@ void DeviceContextManager::LoadPlugin() {
}
#ifdef _WIN32
auto plugin_file = plugin_path_ + "\\mindspore_gpu.dll";
plugin_loader::PluginLoader::LoadDynamicLib(plugin_file, &plugin_maps_);
if (access(plugin_file.c_str(), F_OK) != -1) {
plugin_loader::PluginLoader::LoadDynamicLib(plugin_file, &plugin_maps_);
}
#else
DIR *dir = opendir(plugin_path_.c_str());
if (dir == nullptr) {