cuda-packages.nix: re-use backendStdenv.hasJetsonCudaCapability
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
This commit is contained in:
@@ -5,22 +5,8 @@
|
||||
lib,
|
||||
}:
|
||||
let
|
||||
# NOTE: Because manifests are used to add redistributables to the package set,
|
||||
# we cannot have values depend on the package set itself, or we run into infinite recursion.
|
||||
|
||||
# Since Jetson capabilities are never built by default, we can check if any of them were requested
|
||||
# through final.config.cudaCapabilities and use that to determine if we should change some manifest versions.
|
||||
# Copied from backendStdenv.
|
||||
hasJetsonCudaCapability =
|
||||
let
|
||||
jetsonCudaCapabilities = lib.filter (
|
||||
cudaCapability: _cuda.db.cudaCapabilityToInfo.${cudaCapability}.isJetson
|
||||
) _cuda.db.allSortedCudaCapabilities;
|
||||
in
|
||||
lib.intersectLists jetsonCudaCapabilities (config.cudaCapabilities or [ ]) != [ ];
|
||||
selectManifests = lib.mapAttrs (name: version: _cuda.manifests.${name}.${version});
|
||||
in
|
||||
{
|
||||
|
||||
cudaPackages_12_6 = callPackage ../development/cuda-modules {
|
||||
manifests = selectManifests {
|
||||
cublasmp = "0.6.0";
|
||||
@@ -36,7 +22,7 @@ in
|
||||
nvjpeg2000 = "0.9.0";
|
||||
nvpl = "25.5";
|
||||
nvtiff = "0.5.1";
|
||||
tensorrt = if hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
tensorrt = if cudaPackages_12_6.backendStdenv.hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -55,7 +41,7 @@ in
|
||||
nvjpeg2000 = "0.9.0";
|
||||
nvpl = "25.5";
|
||||
nvtiff = "0.5.1";
|
||||
tensorrt = if hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
tensorrt = if cudaPackages_12_8.backendStdenv.hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -74,7 +60,7 @@ in
|
||||
nvjpeg2000 = "0.9.0";
|
||||
nvpl = "25.5";
|
||||
nvtiff = "0.5.1";
|
||||
tensorrt = if hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
tensorrt = if cudaPackages_12_9.backendStdenv.hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -93,7 +79,15 @@ in
|
||||
nvjpeg2000 = "0.9.0";
|
||||
nvpl = "25.5";
|
||||
nvtiff = "0.5.1";
|
||||
tensorrt = if hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
tensorrt = if cudaPackages_13_0.backendStdenv.hasJetsonCudaCapability then "10.7.0" else "10.9.0";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit
|
||||
cudaPackages_12_6
|
||||
cudaPackages_12_8
|
||||
cudaPackages_12_9
|
||||
cudaPackages_13_0
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user