caffe: remove broken CUDA support
It’s been marked as broken for over a year and requires CUDA 10. Even the non‐CUDA variant of the package refused to evaluate without enabling broken packages due to `cudnn`, so I’m not sure anyone is using this package at all…
This commit is contained in:
parent
80996d5d59
commit
d9ee62b6aa
@ -14,23 +14,11 @@
|
||||
, Accelerate, CoreGraphics, CoreVideo
|
||||
, lmdbSupport ? true, lmdb
|
||||
, leveldbSupport ? true, leveldb, snappy
|
||||
, cudaSupport ? config.cudaSupport, cudaPackages ? { }
|
||||
, cudnnSupport ? cudaSupport
|
||||
, ncclSupport ? false
|
||||
, pythonSupport ? false, python ? null, numpy ? null
|
||||
, substituteAll
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (cudaPackages) backendStdenv 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.
|
||||
hasCudnn =
|
||||
if lib.versionOlder cudatoolkit.version "10.1"
|
||||
then cudaPackages ? cudnn
|
||||
else cudaPackages ? cudnn_7_6;
|
||||
|
||||
toggle = bool: if bool then "ON" else "OFF";
|
||||
|
||||
test_model_weights = fetchurl {
|
||||
@ -57,20 +45,12 @@ stdenv.mkDerivation rec {
|
||||
# boost_python expects
|
||||
[ (if pythonSupport then "-Dpython_version=${python.pythonVersion}" else "-DBUILD_python=OFF")
|
||||
"-DBLAS=open"
|
||||
] ++ (if cudaSupport then [
|
||||
"-DCUDA_ARCH_NAME=All"
|
||||
"-DCUDA_HOST_COMPILER=${backendStdenv.cc}/bin/cc"
|
||||
] else [ "-DCPU_ONLY=ON" ])
|
||||
++ ["-DUSE_NCCL=${toggle ncclSupport}"]
|
||||
++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"]
|
||||
"-DCPU_ONLY=ON"
|
||||
] ++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"]
|
||||
++ ["-DUSE_LMDB=${toggle lmdbSupport}"];
|
||||
|
||||
buildInputs = [ boost gflags glog protobuf hdf5-cpp opencv4 blas ]
|
||||
++ lib.optional cudaSupport cudatoolkit
|
||||
++ lib.optional (lib.versionOlder cudatoolkit.version "10.1" && hasCudnn) cudaPackages.cudnn
|
||||
++ lib.optional (lib.versionAtLeast cudatoolkit.version "10.1" && hasCudnn) cudaPackages.cudnn_7_6
|
||||
++ lib.optional lmdbSupport lmdb
|
||||
++ lib.optional ncclSupport nccl
|
||||
++ lib.optionals leveldbSupport [ leveldb snappy ]
|
||||
++ lib.optionals pythonSupport [ python numpy ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreGraphics CoreVideo ]
|
||||
@ -105,9 +85,6 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace src/caffe/util/io.cpp --replace \
|
||||
'SetTotalBytesLimit(kProtoReadBytesLimit, 536870912)' \
|
||||
'SetTotalBytesLimit(kProtoReadBytesLimit)'
|
||||
'' + lib.optionalString (cudaSupport && lib.versionAtLeast cudatoolkit.version "9.0") ''
|
||||
# CUDA 9.0 doesn't support sm_20
|
||||
sed -i 's,20 21(20) ,,' cmake/Cuda.cmake
|
||||
'';
|
||||
|
||||
preConfigure = lib.optionalString pythonSupport ''
|
||||
@ -150,10 +127,7 @@ stdenv.mkDerivation rec {
|
||||
maintainers = [ ];
|
||||
broken =
|
||||
(pythonSupport && (python.isPy310))
|
||||
|| cudaSupport
|
||||
|| !(leveldbSupport -> (leveldb != null && snappy != null))
|
||||
|| !(cudnnSupport -> (hasCudnn && cudaSupport))
|
||||
|| !(ncclSupport -> (cudaSupport && !nccl.meta.unsupported))
|
||||
|| !(pythonSupport -> (python != null && numpy != null))
|
||||
;
|
||||
license = licenses.bsd2;
|
||||
|
@ -182,6 +182,7 @@ mapAliases {
|
||||
|
||||
### C ###
|
||||
|
||||
caffeWithCuda = throw "caffeWithCuda has been removed, as it was broken and required CUDA 10"; # Added 2024-11-20
|
||||
calligra = kdePackages.calligra; # Added 2024-09-27
|
||||
callPackage_i686 = pkgsi686Linux.callPackage;
|
||||
cask = emacs.pkgs.cask; # Added 2022-11-12
|
||||
|
@ -18102,15 +18102,11 @@ with pkgs;
|
||||
### SCIENCE / MATH
|
||||
|
||||
caffe = callPackage ../applications/science/math/caffe ({
|
||||
inherit (config) cudaSupport;
|
||||
cudaPackages = cudaPackages_10_1;
|
||||
opencv4 = opencv4WithoutCuda; # Used only for image loading.
|
||||
blas = openblas;
|
||||
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
|
||||
} // (config.caffe or {}));
|
||||
|
||||
caffeWithCuda = caffe.override { cudaSupport = true; };
|
||||
|
||||
gap-minimal = lowPrio (gap.override { packageSet = "minimal"; });
|
||||
|
||||
gap-full = lowPrio (gap.override { packageSet = "full"; });
|
||||
|
@ -101,6 +101,7 @@ mapAliases ({
|
||||
BTrees = btrees; # added 2023-02-19
|
||||
cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21
|
||||
cadquery = throw "cadquery was removed, because it was disabled on all python version since 3.8 and marked as broken"; # added 2024-05-13
|
||||
caffeWithCuda = throw "caffeWithCuda has been removed, as it was broken and required CUDA 10"; # Added 2024-11-20
|
||||
can = python-can; # added 2024-08-12
|
||||
carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18
|
||||
case = throw "case has been removed, since it is an unused leaf package with a dependency on the nose test framework"; # added 2024-07-08
|
||||
|
@ -1989,11 +1989,6 @@ self: super: with self; {
|
||||
inherit (self) python numpy boost;
|
||||
});
|
||||
|
||||
caffeWithCuda = toPythonModule (pkgs.caffeWithCuda.override {
|
||||
pythonSupport = true;
|
||||
inherit (self) python numpy boost;
|
||||
});
|
||||
|
||||
caio = callPackage ../development/python-modules/caio { };
|
||||
|
||||
cairocffi = callPackage ../development/python-modules/cairocffi { };
|
||||
|
@ -118,7 +118,6 @@ let
|
||||
python3Packages = {
|
||||
boxx = linux;
|
||||
bpycv = linux;
|
||||
caffe = linux;
|
||||
catboost = linux;
|
||||
chainer = linux;
|
||||
cupy = linux;
|
||||
|
Loading…
Reference in New Issue
Block a user