From 2643a9e056acc7db5345798b644b6bca8bb7ab78 Mon Sep 17 00:00:00 2001 From: eliasmagn Date: Thu, 5 Mar 2026 21:50:56 +0100 Subject: [PATCH] =?UTF-8?q?Replaced=20the=20incorrect=20`major=20*=2010=20?= =?UTF-8?q?+=20minor`=20logic=20(e.g.=20ROCm=207.12=20=E2=86=92=20"82";=20?= =?UTF-8?q?CUDA=20breaks=20when=20minor=20>=209)=20with=20simple=20string?= =?UTF-8?q?=20concatenation,=20producing=20the=20expected=20tags:=20-=20RO?= =?UTF-8?q?Cm=207.12=20=E2=86=92=20"712"=20-=20CUDA=2012.4=20=E2=86=92=20"?= =?UTF-8?q?124"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes version tag derivation consistent across CUDA and ROCm and fixes ROCm shared library name resolution (e.g. libbitsandbytes_rocm712.so). We should not use zero-padding (e.g. `{minor:02d}`), as that would change CUDA tags (e.g. 12.4 → "1204") . --- bitsandbytes/cuda_specs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitsandbytes/cuda_specs.py b/bitsandbytes/cuda_specs.py index 2a1d06daa..f9fdd295d 100644 --- a/bitsandbytes/cuda_specs.py +++ b/bitsandbytes/cuda_specs.py @@ -49,7 +49,7 @@ def get_cuda_version_string() -> Optional[str]: if version_tuple is None: return None major, minor = version_tuple - return f"{major * 10 + minor}" + return f"{major}{minor}" def get_cuda_specs() -> Optional[CUDASpecs]: