Unverified Commit 90bbe147 authored by DevKimbob's avatar DevKimbob Committed by GitHub
Browse files

Fix: Return tuple in get_cuda_version_tuple (#1580)

Changed return type from map object to tuple in get_cuda_version_tuple().
parent 8b6fe9ee
......@@ -23,9 +23,9 @@ def get_compute_capabilities() -> list[tuple[int, int]]:
@lru_cache(None)
def get_cuda_version_tuple() -> tuple[int, int]:
if torch.version.cuda:
return map(int, torch.version.cuda.split(".")[0:2])
return tuple(map(int, torch.version.cuda.split(".")[0:2]))
elif torch.version.hip:
return map(int, torch.version.hip.split(".")[0:2])
return tuple(map(int, torch.version.hip.split(".")[0:2]))
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment