Repository navigation
nix-builder: add support for ROCm 7.14 - #807
Merged
Merged
Conversation
danieldk
marked this pull request as draft
September 2, 2026 12:00
|
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
marked this pull request as ready for review
September 2, 2026 12:02
sayakpaul
approved these changes
Sep 2, 2026
| REPOMD_NAMESPACES = {"repo": "http://linux.duke.edu/metadata/repo"} | ||
|
|
||
| # Suffix marking per-GPU-target subpackages, e.g. amdrocm-blas7.14-gfx942. | ||
| GFX_SUFFIX = re.compile(r"-gfx\d+[a-z0-9]*$") |
Member
There was a problem hiding this comment.
I think it's sufficiently reliable but I always have the fear of fragility with regexes.
Comment on lines
+291
to
+294
| // (import ./pkgs/rocm-packages-old { | ||
| inherit (final) callPackage; | ||
| inherit (prev) lib; | ||
| }) |
This branch was previously deployed
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.
Torch 2.14 adds support for ROCm 7.14. However, this is not a simple update on our side, since upstream switched to a new build system + repository for ROCm packages (TheRock). The main issue is that all the components are packaged differently, not only do they use different package names, there is no 1:1 mapping at all.
To accommodate these changes, the
rocm-packagesis forked intorocm-packagesandrocm-packages-old.rocm-packagesis the new package set, whereasrocm-packages-oldis used for ROCm 7.1/7.2. We will have to keeprocm-packages-oldaround as long as we have Torch + ROCm build variants that use these ROCm 7.1/7.2. Due to the splitting, the diff looks much larger than it really is. The main changes are:rhel2nix.pypoints to the new repository, supports having multiple ROCm versions in the same repository, and defines some new merges (because there is a cyclic dependency in the new ROCm).patchelf/autoPatchelfHookoverride is added to rocmPackages. This solves an issue where the olderpatchelfin nixpkgs errors out and then writes broken dynamic libraries. We currently pin the same version as TheRock. See a full description of the issue in: Local (non-docker) Python wheel packaging trustspatchelffrom PATH -> silently corrupt, import-segfaulting wheels with system patchelf 0.18.0 ROCm/TheRock#6712cpio(used byrpmextract) successfully extracts the archive, but emits warning and returns a non-zero exit code. To avoid this issue, we runcpioexplicitly and permit the non-zero exit code as long as the only emitted error is the failure to set the setgid bit.Note that to keep things simple, both the old and the new package sets create
rocmPackages_<major>_<minor>attrsets in nixpkgs. To be able to distinguish the package set in other derivations, we add a top-leveltheRockattribute to the package set, which is onlytruefor the new package set. This attribute can be removed once we remove the old package set.Due to this splitting, the diff looks much larger than it really is, because both package sets