Skip to content

Commit 90bbe14

Browse files
authored
Fix: Return tuple in get_cuda_version_tuple (#1580)
Changed return type from map object to tuple in get_cuda_version_tuple().
1 parent 8b6fe9e commit 90bbe14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitsandbytes/cuda_specs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def get_compute_capabilities() -> list[tuple[int, int]]:
2323
@lru_cache(None)
2424
def get_cuda_version_tuple() -> tuple[int, int]:
2525
if torch.version.cuda:
26-
return map(int, torch.version.cuda.split(".")[0:2])
26+
return tuple(map(int, torch.version.cuda.split(".")[0:2]))
2727
elif torch.version.hip:
28-
return map(int, torch.version.hip.split(".")[0:2])
28+
return tuple(map(int, torch.version.hip.split(".")[0:2]))
2929

3030
return None
3131

0 commit comments

Comments
 (0)