!48545 fix gpu checkversion on ascend/cpu env

Merge pull request !48545 from zhoufeng/xiu-ba-ge-2
This commit is contained in:
i-robot 2023-02-08 09:11:14 +00:00 committed by Gitee
commit 9b423288be
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ class GPUEnvChecker(EnvChecker):
mindspore_path = os.path.join(current_path, "../lib/plugin")
try:
real_path = self.library_path
if real_path == []:
if real_path is None or real_path == []:
logger.error(f"{self.lib_key_to_lib_name[lib_name]} (need by mindspore-gpu) is not found, please "
f"confirm that libmindspore_gpu.so is in directory:{mindspore_path} and the correct cuda "
"version has been installed, you can refer to the installation "