From 291db05669ce38ff830af858aacea5c20fb13cbf Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Mon, 20 Feb 2023 11:27:55 -0500 Subject: [PATCH] caffe: use pre-CUDNN 8.x --- pkgs/applications/science/math/caffe/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index d6c95633dd52..ed6836afbd92 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -21,7 +21,13 @@ }: let - inherit (cudaPackages) cudatoolkit cudnn nccl; + inherit (cudaPackages) cudatoolkit nccl; + # The default for cudatoolkit 10.1 is CUDNN 8.0.5, the last version to support CUDA 10.1. + # However, this caffe does not build with CUDNN 8.x, so we use CUDNN 7.6.5 instead. + # Earlier versions of cudatoolkit use pre-8.x CUDNN, so we use the default. + cudnn = if lib.versionOlder cudatoolkit.version "10.1" + then cudaPackages.cudnn + else cudaPackages.cudnn_7_6_5; in assert leveldbSupport -> (leveldb != null && snappy != null);