Repository navigation
Backport ROCm version fixes (#902, #959) - #962
Merged
danieldk merged 2 commits intoNov 2, 2026
Merged
Conversation
Python part only: use `torch.version.rocm` to get the ROCm version, falling back to `torch.version.hip`. (cherry picked from commit dc9dbf4)
ROCm build variants were matched by exact tag, so a system on ROCm 10.1 rejects the existing `rocm100` builds. This applies the same rule we use for CUDA: given a system ROCm version x.y, builds for ROCm x.z with z <= y are accepted, newest first. Builds for a different major are still rejected, so 7.x and 10.x builds never mix. (cherry picked from commit f3feb6b)
|
Hi @Abdennacer-Badaoui, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/huggingface/kernels/blob/main/CONTRIBUTING.md for more details. |
|
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. |
danieldk
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport to
release-0.17, for a 0.17.3 release (transformers pinskernels<0.18).Two commits:
torch.version.rocm, falling back totorch.version.hip. 0.17 still usestorch.version.hip, which is 7.16 on ROCm 10.1. Without this, Accept older ROCm minor versions within the same major #959 alone would make 0.17 acceptrocm7xbuilds on ROCm 10.x, which is the cross-major mixing we want to avoid. The kernel-builder parts of ROCm fixes for Torch 2.15 #902 are left out.test_variants.py, because 0.17'stest_resolve_cpu_linuxhas nolinux_abiparameter. I kept 0.17's version.Checked by mocking
torch.version.hip = "7.16…"andtorch.version.rocm = "10.1.0": the backend is detected as ROCm 10.1, and only therocm101/rocm100builds are accepted (notrocm71/rocm72/rocm714).test_variants.py,test_archs.pyandtest_basic.pyrun with the same results as unmodifiedrelease-0.17: the 3 new tests pass. The 2 failures and 4 errors intest_get_variantsandtest_basic.pyalso happen onrelease-0.17without these changes.