Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cudaPackages: fix cudaGencode when cudaForwardCompat is true (closes #215436) #215552

Closed
wants to merge 1 commit into from

Conversation

ConnorBaker
Copy link
Contributor

@ConnorBaker ConnorBaker commented Feb 9, 2023

Description of changes

Closes #215436.

Before:

nix-repl> legacyPackages.x86_64-linux.cudaPackages_11_8.cudaFlags.cudaGencode
[ "-gencode=arch=compute_35,code=sm_35" "-gencode=arch=compute_50,code=sm_50" "-gencode=arch=compute_52,code=sm_52" "-gencode=arch=compute_60,code=sm_60" "-gencode=arch=compute_61,code=sm_61" "-gencode=arch=compute_70,code=sm_70" "-gencode=arch=compute_75,code=sm_75" "-gencode=arch=compute_80,code=sm_80" "-gencode=arch=compute_86,code=sm_86" "-gencode=arch=compute_compute_86,code=compute_compute_86" ]

After:

nix-repl> legacyPackages.x86_64-linux.cudaPackages_11_8.cudaFlags.cudaGencode
[ "-gencode=arch=compute_35,code=sm_35" "-gencode=arch=compute_50,code=sm_50" "-gencode=arch=compute_52,code=sm_52" "-gencode=arch=compute_60,code=sm_60" "-gencode=arch=compute_61,code=sm_61" "-gencode=arch=compute_70,code=sm_70" "-gencode=arch=compute_75,code=sm_75" "-gencode=arch=compute_80,code=sm_80" "-gencode=arch=compute_86,code=sm_86" "-gencode=arch=compute_86,code=compute_86" ]

Specifically, "-gencode=arch=compute_compute_86,code=compute_compute_86" becomes "-gencode=arch=compute_86,code=compute_86", which is a valid architecture per https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#gpu-name-gpuname-arch.

Must be merged prior to #215549.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

cc @NixOS/cuda-maintainers @cuda-maintainers

@ConnorBaker ConnorBaker mentioned this pull request Feb 9, 2023
14 tasks
@ofborg ofborg 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 Feb 9, 2023
@ConnorBaker
Copy link
Contributor Author

Result of nixpkgs-review pr 215552 run on x86_64-linux 1

@ConnorBaker
Copy link
Contributor Author

I don't understand why this rebuilt nothing given the flags changed.

@SomeoneSerge SomeoneSerge added the 6.topic: cuda Parallel computing platform and API label Feb 11, 2023
@ConnorBaker
Copy link
Contributor Author

I can confirm that this fix allows NCCL to build when using cudaFlags: #215549.

@ConnorBaker
Copy link
Contributor Author

Bundling into #215229.

@ConnorBaker ConnorBaker deleted the cudaGencode-fix branch February 22, 2023 04:36
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 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
None yet
Development

Successfully merging this pull request may close these issues.

cudaFlags: Incorrect cudaGencode when cudaForwardCompat is true
2 participants