Skip to content

tree-wide: use named CUDA versions and CUDA version utilities#405664

Merged
ConnorBaker merged 1 commit intoNixOS:masterfrom
ConnorBaker:feat/treewide-cuda-use-named-versions
May 9, 2025
Merged

tree-wide: use named CUDA versions and CUDA version utilities#405664
ConnorBaker merged 1 commit intoNixOS:masterfrom
ConnorBaker:feat/treewide-cuda-use-named-versions

Conversation

@ConnorBaker
Copy link
Contributor

Additional cleanup prior to landing more changes from https://github.com/ConnorBaker/cuda-packages/tree/main.

This PR is a tree-wide change which moves from cudaVersion to cudaMajorMinorVersion, and where possible, makes use of the cudaOlder and cudaAtLeast utility functions in cudaPackages.

As cudaVersion happened to be a major-minor version before this change, there should be no rebuilds.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ConnorBaker ConnorBaker self-assigned this May 9, 2025
@ConnorBaker ConnorBaker added the 6.topic: cuda Parallel computing platform and API label May 9, 2025
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label May 9, 2025
@ConnorBaker ConnorBaker moved this from New to 🏗 In progress in CUDA Team May 9, 2025
@ConnorBaker ConnorBaker force-pushed the feat/treewide-cuda-use-named-versions branch 3 times, most recently from 63b2375 to d3fd219 Compare May 9, 2025 20:36
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 9, 2025
@ConnorBaker ConnorBaker marked this pull request as ready for review May 9, 2025 20:39
Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

I went through the diff and was not able to spot anything wrong. Approved!

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
@ConnorBaker ConnorBaker force-pushed the feat/treewide-cuda-use-named-versions branch from d3fd219 to bf766a2 Compare May 9, 2025 21:16
@ConnorBaker
Copy link
Contributor Author

Added back the comment block on libPath I accidentally stripped from pkgs/development/cuda-modules/cutensor/extension.nix.

@ConnorBaker ConnorBaker moved this from 🏗 In progress to 🔖 Awaits the merge in CUDA Team May 9, 2025
Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Added back the comment block on libPath I accidentally stripped from pkgs/development/cuda-modules/cutensor/extension.nix.

Ok! I wondered about why you removed it in the first place. All good anyway!

@ConnorBaker ConnorBaker merged commit 7109c07 into NixOS:master May 9, 2025
23 of 27 checks passed
@github-project-automation github-project-automation bot moved this from 🔖 Awaits the merge to ✅ Done in CUDA Team May 9, 2025
@ConnorBaker ConnorBaker deleted the feat/treewide-cuda-use-named-versions branch May 9, 2025 21:29

cudatoolkitDevMerged = symlinkJoin {
name = "cuda-${cudaPackages.cudaVersion}-dev-merged";
name = "cuda-${cudaPackages.cudaMajorMinorVersion}-dev-merged";
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand the cudaOlder part, but what is the motivation for stripping the version strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stripping in what way?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is cudaVersion guaranteed to be major.minor, or is that just a coincidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cuda Parallel computing platform and API 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants