Prevent eval breakage in CUDA extensions#192958
Prevent eval breakage in CUDA extensions#192958samuela merged 2 commits intoNixOS:masterfrom aidalgol:cuda-exts-prevent-eval-break
Conversation
samuela
left a comment
There was a problem hiding this comment.
Is there a nix mechanism to raise a warning to the user when we are unable to find a compatible version?
|
I'm getting the following evaluation error when attempting to run nixpkgs-review: |
As far as I know, you can only do that for errors. I hope I'm wrong. |
|
I also got that error from NIXPKGS_ALLOW_UNFREE=1 nix-build -A caffeFrom my |
|
I still don't know why ❯ NIXPKGS_ALLOW_UNFREE=1 nix repl .
Welcome to Nix 2.8.1. Type :? for help.
Loading '.'...
Added 17005 variables.
nix-repl> :b cudaPackages_10_1.cudnn
error: attribute 'cudnn_8_3_2' missing
at /home/aidan/src/nixpkgs/pkgs/development/libraries/science/math/cudnn/extension.nix:30:32:
29| # Set the default attributes, e.g. cudnn = cudnn_8_3_1;
30| defaultBuild = { "cudnn" = allBuilds.${computeName cuDnnDefaultVersion}; };
| ^
31| in allBuilds // defaultBuild; |
|
It turns out that the |
|
|
|
Thanks! I didn't even think to try that because I thought |
When passed a CUDA version not in the table of default cuDNN versions for CUDA versions, fall back to a default package version instead of breaking evaluation of the package.
When passed a CUDA version not in the table of default TensorRT versions for CUDA versions, fall back to a default package version instead of breaking evaluation of the package.
Huh, yeah I expected the same. Seems though if a sub-expression errors, any parent expression ought to error as well... TIL! |
|
Result of |
|
Ok, well Only remaining issue is if we can get a warning when the version is not found. Does anyone know if such a thing is possible in Nix? |
|
Result of |
I think the |
|
Ah yeah, that's a fair point. I think as long as they're marked as |
Description of changes
For both cuDNN and TensorRT, add a fallback mechanism when passed a CUDA version not in the table of default package versions for CUDA versions. Previously, adding a new CUDA version would break these extensions.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notesSee also #185557