Merge pull request #197157 from tpwrules/cutensor-fixes

python3Packages.cupy: upgrade and fix build

authored by

Sandro and committed by
GitHub
100e2c66 ee419e44

+11 -9
+4 -1
pkgs/development/libraries/science/math/cutensor/generic.nix
··· 13 13 let 14 14 mostOfVersion = builtins.concatStringsSep "." 15 15 (lib.take 3 (lib.versions.splitVersion version)); 16 + platform = "${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}"; 16 17 in 17 18 18 19 stdenv.mkDerivation { ··· 20 21 inherit version; 21 22 22 23 src = fetchurl { 23 - 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"; 24 + url = if lib.versionOlder mostOfVersion "1.3.3" 25 + then "https://developer.download.nvidia.com/compute/cutensor/${mostOfVersion}/local_installers/libcutensor-${platform}-${version}.tar.gz" 26 + else "https://developer.download.nvidia.com/compute/cutensor/redist/libcutensor/${platform}/libcutensor-${platform}-${version}-archive.tar.xz"; 24 27 inherit hash; 25 28 }; 26 29
+2 -5
pkgs/development/python-modules/cupy/default.nix
··· 9 9 inherit (cudaPackages) cudatoolkit cudnn cutensor nccl; 10 10 in buildPythonPackage rec { 11 11 pname = "cupy"; 12 - version = "11.1.0"; 12 + version = "11.2.0"; 13 13 disabled = !isPy3k; 14 14 15 15 src = fetchPypi { 16 16 inherit pname version; 17 - sha256 = "sha256-4TtvmQrd172HCQWvQp+tUQhNCFf4YA3TIGod9aRoTt0="; 17 + sha256 = "sha256-wzNh8RejR6Y/aZbql0RtF/HAOPGh9TPlAkZCNQdpI+I="; 18 18 }; 19 19 20 20 # See https://docs.cupy.dev/en/v10.2.0/reference/environment.html. Seting both ··· 70 70 license = licenses.mit; 71 71 platforms = [ "x86_64-linux" ]; 72 72 maintainers = with maintainers; [ hyphon81 ]; 73 - 74 - # See https://github.com/NixOS/nixpkgs/pull/179912#issuecomment-1206265922. 75 - broken = true; 76 73 }; 77 74 }
+2
pkgs/test/cuda/cuda-library-samples/generic.nix
··· 54 54 55 55 src = "${src}/cuTENSOR"; 56 56 57 + buildInputs = [ cutensor ]; 58 + 57 59 cmakeFlags = [ 58 60 "-DCUTENSOR_EXAMPLE_BINARY_INSTALL_DIR=${builtins.placeholder "out"}/bin" 59 61 ];
+3 -3
pkgs/top-level/cuda-packages.nix
··· 28 28 "1.2.2.5" = { 29 29 hash = "sha256-lU7iK4DWuC/U3s1Ct/rq2Gr3w4F2U7RYYgpmF05bibY="; 30 30 }; 31 - "1.3.1.3" = { 32 - hash = "sha256-mNlVnabB2IC3HnYY0mb06RLqQzDxN9ePGVeBy3hkBC8="; 31 + "1.5.0.3" = { 32 + hash = "sha256-T96+lPC6OTOkIs/z3QWg73oYVSyidN0SVkBWmT9VRx0="; 33 33 }; 34 34 }; 35 35 36 36 inherit (final) cudaMajorMinorVersion cudaMajorVersion; 37 37 38 38 cutensor = buildCuTensorPackage rec { 39 - version = if cudaMajorMinorVersion == "10.1" then "1.2.2.5" else "1.3.1.3"; 39 + version = if cudaMajorMinorVersion == "10.1" then "1.2.2.5" else "1.5.0.3"; 40 40 inherit (cuTensorVersions.${version}) hash; 41 41 # This can go into generic.nix 42 42 libPath = "lib/${if cudaMajorVersion == "10" then cudaMajorMinorVersion else cudaMajorVersion}";