Skip to content

rocmPackages: clean up, reduce closure sizes#444860

Merged
JohnRTitor merged 27 commits intoNixOS:masterfrom
LunNova:lunnova/rocm-dep-cleanup
Oct 11, 2025
Merged

rocmPackages: clean up, reduce closure sizes#444860
JohnRTitor merged 27 commits intoNixOS:masterfrom
LunNova:lunnova/rocm-dep-cleanup

Conversation

@LunNova
Copy link
Member

@LunNova LunNova commented Sep 21, 2025

Closure size before:

/nix/store/9ais8l1ld6dgywsg9is3nxjj0xnayyh6-clr-6.4.3    6.4G

Closure size after:

/nix/store/p07lwzvwrqjwhx8qys00r3lbmh056mw9-clr-6.4.3    835.3M

Some ROCm packages had unnecessary git dependencies, mostly for CMakeLists that were doing find_package(Git REQUIRED) that have now been dropped upstream.

rocprofiler used to require libsystemd but no longer does

rocblas still insists on a git but swap it for gitMinimal.

various packages relied on the rocm-merged-llvm symlinkJoin in rocmPackages.llvm. This has been destroyed and direct deps plus occasional path patching have been applied instead.

rocm's llvm toolchain that it needs at runtime no longer has refs to unneeded at runtime libllvm/libclang static libraries that took up well over a gigabyte.

rocm's llvm toolchain no longer includes clang-tools-extra. no need for clang-tidy or clangd at runtime.

Things done


Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. labels Sep 21, 2025
@LunNova

This comment was marked as outdated.

@LunNova LunNova force-pushed the lunnova/rocm-dep-cleanup branch from 6346251 to fa5c166 Compare September 24, 2025 15:33
@LunNova LunNova marked this pull request as draft September 24, 2025 15:33
@LunNova LunNova force-pushed the lunnova/rocm-dep-cleanup branch 2 times, most recently from afd11ac to f8f86d4 Compare September 24, 2025 15:47
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Sep 24, 2025
@LunNova LunNova force-pushed the lunnova/rocm-dep-cleanup branch from f8f86d4 to 40595af Compare September 26, 2025 01:12
@nixpkgs-ci nixpkgs-ci bot added 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related and removed 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Sep 26, 2025
@LunNova LunNova added the 8.has: clean-up This PR removes packages or removes other cruft label Sep 26, 2025
@LunNova LunNova changed the title rocmPackages: clean up unneeded dependencies rocmPackages: clean up, reduce closure sizes Sep 26, 2025
@ksf
Copy link

ksf commented Sep 26, 2025

Down from over six gigs to one? You're a magician.

@LunNova LunNova force-pushed the lunnova/rocm-dep-cleanup branch from 40595af to 2423ad8 Compare September 28, 2025 03:24
rocm-path shouldn't have been added at top-level.
We have a separate non-recursed section containing symlinkJoins for
this, and best practice in nixpkgs is to avoid ROCM_PATH when possible
and create a minimal one in each package that needs one.
@LunNova LunNova force-pushed the lunnova/rocm-dep-cleanup branch from a0c114e to c1cfcf3 Compare October 2, 2025 15:12
@LunNova LunNova requested a review from Flakebi October 2, 2025 15:13
@LunNova LunNova changed the base branch from staging to master October 5, 2025 16:22
@nixpkgs-ci nixpkgs-ci bot closed this Oct 5, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Oct 5, 2025
Copy link
Member

@Flakebi Flakebi left a comment

Choose a reason for hiding this comment

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

Still looking good to me

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 6, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 8, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2581

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Oct 9, 2025
@LunNova
Copy link
Member Author

LunNova commented Oct 11, 2025

@JohnRTitor you might also be interested in this PR that cuts down rocmPackages closure sizes

@JohnRTitor
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 444860

Logs: https://github.com/JohnRTitor/nixpkgs-review-gha/actions/runs/18425055520


x86_64-linux

✅ 3 packages built:
  • rocmPackages.clr
  • rocmPackages.clr.debug (rocmPackages.clr.debug.debug, rocmPackages.clr.debug.icd)
  • rocmPackages.clr.icd (rocmPackages.clr.icd.debug, rocmPackages.clr.icd.icd)

aarch64-linux

⏩ 3 packages marked as broken and skipped:
  • rocmPackages.clr
  • rocmPackages.clr.debug
  • rocmPackages.clr.icd

@JohnRTitor JohnRTitor added this pull request to the merge queue Oct 11, 2025
Merged via the queue into NixOS:master with commit 32d957e Oct 11, 2025
60 checks passed
@LunNova LunNova deleted the lunnova/rocm-dep-cleanup branch October 11, 2025 16:27
@amarshall amarshall mentioned this pull request Oct 25, 2025
3 tasks
@amarshall
Copy link
Member

Hi @LunNova! This PR unfortunately causes Davinci Resolve to hang loading projects when hardware.amdgpu.opencl.enable = true;. Reverting atop nixos-unstable resolves. See discussion, elaboration, and reproduction steps in #448456 (comment).

LunNova added a commit to LunNova/nixpkgs that referenced this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants