Skip to content

cuda_specs.py: fix version tag string for ROCm/CUDA library lookup#1889

Merged
matthewdouglas merged 1 commit intobitsandbytes-foundation:mainfrom
eliasmagn:main
Mar 9, 2026
Merged

cuda_specs.py: fix version tag string for ROCm/CUDA library lookup#1889
matthewdouglas merged 1 commit intobitsandbytes-foundation:mainfrom
eliasmagn:main

Conversation

@eliasmagn
Copy link
Contributor

Replaced the incorrect major * 10 + minor logic (e.g. ROCm 7.12 → "82"; CUDA breaks when minor > 9) with simple string concatenation, producing the expected tags:

  • ROCm 7.12 → "712"
  • CUDA 12.4 → "124"

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") .

Hope this helps.

…82"; CUDA breaks when minor > 9) with simple string concatenation, producing the expected tags:

- ROCm 7.12 → "712"
- CUDA 12.4 → "124"

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") .
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@matthewdouglas matthewdouglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@matthewdouglas matthewdouglas merged commit f1dcf42 into bitsandbytes-foundation:main Mar 9, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA Issues and PRs related to the CUDA backend, excluding installation/support help. ROCm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build incorrectly parses the ROCm version string from torch.version.hip -> 7.12 becomes 82

2 participants