cudaPackages.cutensor: 1.3.1.3 -> 1.5.0.3

Update cutensor to the latest version compatible with its only dependent
in nixpkgs, cupy. Future work might wish to make multiple versions
available. Also update the URL format for all known versions.
This commit is contained in:
Thomas Watson 2022-10-21 21:45:15 -05:00
parent 4784cdb28b
commit 2cec04c8a2
2 changed files with 7 additions and 4 deletions

View File

@ -13,6 +13,7 @@
let
mostOfVersion = builtins.concatStringsSep "."
(lib.take 3 (lib.versions.splitVersion version));
platform = "${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}";
in
stdenv.mkDerivation {
@ -20,7 +21,9 @@ stdenv.mkDerivation {
inherit version;
src = fetchurl {
url = "https://developer.download.nvidia.com/compute/cutensor/${mostOfVersion}/local_installers/libcutensor-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}-${version}.tar.gz";
url = if lib.versionOlder mostOfVersion "1.3.3"
then "https://developer.download.nvidia.com/compute/cutensor/${mostOfVersion}/local_installers/libcutensor-${platform}-${version}.tar.gz"
else "https://developer.download.nvidia.com/compute/cutensor/redist/libcutensor/${platform}/libcutensor-${platform}-${version}-archive.tar.xz";
inherit hash;
};

View File

@ -28,15 +28,15 @@ let
"1.2.2.5" = {
hash = "sha256-lU7iK4DWuC/U3s1Ct/rq2Gr3w4F2U7RYYgpmF05bibY=";
};
"1.3.1.3" = {
hash = "sha256-mNlVnabB2IC3HnYY0mb06RLqQzDxN9ePGVeBy3hkBC8=";
"1.5.0.3" = {
hash = "sha256-T96+lPC6OTOkIs/z3QWg73oYVSyidN0SVkBWmT9VRx0=";
};
};
inherit (final) cudaMajorMinorVersion cudaMajorVersion;
cutensor = buildCuTensorPackage rec {
version = if cudaMajorMinorVersion == "10.1" then "1.2.2.5" else "1.3.1.3";
version = if cudaMajorMinorVersion == "10.1" then "1.2.2.5" else "1.5.0.3";
inherit (cuTensorVersions.${version}) hash;
# This can go into generic.nix
libPath = "lib/${if cudaMajorVersion == "10" then cudaMajorMinorVersion else cudaMajorVersion}";