Skip to content

Commit c490b9c

Browse files
committed
fix first launch
1 parent 61961f5 commit c490b9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/rocm.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ def get_gfx_version(self) -> Union[str, None]:
8383

8484

8585
def get_version_torch() -> Union[str, None]:
86-
version_ = importlib.metadata.version("torch")
86+
version_ = None
87+
try:
88+
version_ = importlib.metadata.version("torch")
89+
except importlib.metadata.PackageNotFoundError:
90+
return None
8791
if "+rocm" not in version_: # unofficial build, non-rocm torch.
8892
return None
8993
return version_.split("+rocm")[1]

0 commit comments

Comments
 (0)