mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
ctranslate2: enable cuDNN only if it is available
This commit is contained in:
parent
5a54140dff
commit
d23df73a07
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
|
|||||||
cudaPackages.cuda_cudart
|
cudaPackages.cuda_cudart
|
||||||
cudaPackages.libcublas
|
cudaPackages.libcublas
|
||||||
cudaPackages.libcurand
|
cudaPackages.libcurand
|
||||||
] ++ lib.optionals withCuDNN [
|
] ++ lib.optionals (withCUDA && withCuDNN) [
|
||||||
cudaPackages.cudnn
|
cudaPackages.cudnn
|
||||||
] ++ lib.optionals withOneDNN [
|
] ++ lib.optionals withOneDNN [
|
||||||
oneDNN
|
oneDNN
|
||||||
@ -87,5 +87,8 @@ stdenv.mkDerivation rec {
|
|||||||
changelog = "https://github.com/OpenNMT/CTranslate2/blob/${src.rev}/CHANGELOG.md";
|
changelog = "https://github.com/OpenNMT/CTranslate2/blob/${src.rev}/CHANGELOG.md";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ hexa misuzu ];
|
maintainers = with maintainers; [ hexa misuzu ];
|
||||||
|
broken =
|
||||||
|
(lib.versionOlder cudaPackages.cudaVersion "11.4")
|
||||||
|
|| !(withCuDNN -> withCUDA);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -20931,7 +20931,8 @@ with pkgs;
|
|||||||
ctranslate2 = callPackage ../development/libraries/ctranslate2 rec {
|
ctranslate2 = callPackage ../development/libraries/ctranslate2 rec {
|
||||||
stdenv = if withCUDA then gcc11Stdenv else pkgs.stdenv;
|
stdenv = if withCUDA then gcc11Stdenv else pkgs.stdenv;
|
||||||
withCUDA = pkgs.config.cudaSupport;
|
withCUDA = pkgs.config.cudaSupport;
|
||||||
withCuDNN = pkgs.config.cudaSupport;
|
withCuDNN = withCUDA && (cudaPackages ? cudnn);
|
||||||
|
cudaPackages = pkgs.cudaPackages;
|
||||||
};
|
};
|
||||||
|
|
||||||
ubus = callPackage ../development/libraries/ubus { };
|
ubus = callPackage ../development/libraries/ubus { };
|
||||||
|
Loading…
Reference in New Issue
Block a user