cudaPackages: align with upstream#342
Conversation
052c832 to
868c446
Compare
a3fb9ca to
5ec7c87
Compare
3467d03 to
c4c2fc4
Compare
elliotberman
left a comment
There was a problem hiding this comment.
I think I've understood the big picture here, left a couple minor comments. Will take another pass at it soon once it's had time to digest.
Aligns with upstream's changes in NixOS/nixpkgs#406568.
Is upstream a dependency?
The default version of nvidia-jetpack is now determined by the default version of the CUDA package set (cudaPackages).
Can you justify why? We talked about this offline, but would be good to get it in writing for our future selves. Super ideally, the comment can be done in overlay.nix and in the PR description.
…eam's cudaPackages.pkgs pattern Signed-off-by: Connor Baker <cbaker2@anduril.com>
Signed-off-by: Connor Baker <cbaker2@anduril.com>
Signed-off-by: Connor Baker <cbaker2@anduril.com>
c4c2fc4 to
c7056cc
Compare
|
Updated to address comments and force-pushed. Added a comment to the version selection of
|
Let's do this in a follow up PR. I'd really like it to be an outright error if you try to reference the wrong JetPack version. |
Description of changes
Aligns with upstream's changes in NixOS/nixpkgs#406568.
nvidia-jetpack.cudaPackagesnow has apkgsattribute which functions in the same way as upstream'scudaPackages.pkgsattribute: https://nixos.org/manual/nixpkgs/stable/#cuda-using-cudapackages-pkgs.The default version of
nvidia-jetpackis now determined by the default version of the CUDA package set (cudaPackages). Changing the default version of the CUDA package set (either through something likecudaPackages_12.pkgsor an overlay) now changes the default version ofnvidia-jetpack.Added assertions to the NixOS configuration which, when CUDA support is requested, check that the default CUDA package set can be used with the current version of JetPack NixOS. As an example, taking a JetPack 6 closure and purposefully changing the default CUDA version by applying an overlay like
would provide this evaluation error:
Important
If NVIDIA provides backward-compatibility guarantees for Tegra/Jetson, using an older version of CUDA packages with a newer system should be okay, but I've nested tested or looked into what's necessary to make that happen.
Note
In order to get the NixOS assertions working for all of the different CUDA overlays I could think of, I did have to change the NixOS module such that it only wraps unsupported
nvidia-jetpackpackage sets in a warning, rather than setting them to the empty attribute set. I can work around this if desired by instead turning it into a singleton which just containscudaPackages.cudaMajorMinorVersion.Added a new check,
jetpackSelectionDependsOnCudaVersion, which uses assertions to verify the version-changing behavior made possible bycudaPackages.pkgsand the like function as expected.Testing