Skip to content

Commit

Permalink
update reg expression for detecting arch
Browse files Browse the repository at this point in the history
  • Loading branch information
lcskrishna authored and pnunna93 committed May 7, 2024
1 parent 5bada9b commit ee04a7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitsandbytes/cuda_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_rocm_gpu_arch() -> str:
try:
if torch.version.hip:
result = subprocess.run(["rocminfo"], capture_output=True, text=True)
match = re.search(r"Name:\s+gfx(\d+)", result.stdout)
match = re.search(r"Name:\s+gfx([a-zA-Z\d]+)", result.stdout)
if match:
return "gfx" + match.group(1)
else:
Expand Down

0 comments on commit ee04a7e

Please sign in to comment.