Merge pull request #224068 from SomeoneSerge/respect-config-cudaSupport
Respect global config.cudaSupport
This commit is contained in:
@@ -12,8 +12,11 @@ compatible are available as well. For example, there can be a
|
|||||||
|
|
||||||
To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional
|
To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional
|
||||||
```nix
|
```nix
|
||||||
cudaSupport ? false
|
{ config
|
||||||
cudaPackages ? {}
|
, cudaSupport ? config.cudaSupport
|
||||||
|
, cudaPackages ? { }
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
```
|
```
|
||||||
|
|
||||||
When using `callPackage`, you can choose to pass in a different variant, e.g.
|
When using `callPackage`, you can choose to pass in a different variant, e.g.
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
, breeze-icons
|
, breeze-icons
|
||||||
, oxygen
|
, oxygen
|
||||||
|
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
, openvdb, libXxf86vm, tbb, alembic
|
, openvdb, libXxf86vm, tbb, alembic
|
||||||
, zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
|
, zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
|
||||||
, jackaudioSupport ? false, libjack2
|
, jackaudioSupport ? false, libjack2
|
||||||
, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}
|
, cudaSupport ? config.cudaSupport, cudaPackages ? { }
|
||||||
, hipSupport ? false, hip # comes with a significantly larger closure size
|
, hipSupport ? false, hip # comes with a significantly larger closure size
|
||||||
, colladaSupport ? true, opencollada
|
, colladaSupport ? true, opencollada
|
||||||
, spaceNavSupport ? stdenv.isLinux, libspnav
|
, spaceNavSupport ? stdenv.isLinux, libspnav
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
, Accelerate, CoreGraphics, CoreVideo
|
, Accelerate, CoreGraphics, CoreVideo
|
||||||
, lmdbSupport ? true, lmdb
|
, lmdbSupport ? true, lmdb
|
||||||
, leveldbSupport ? true, leveldb, snappy
|
, leveldbSupport ? true, leveldb, snappy
|
||||||
, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}
|
, cudaSupport ? config.cudaSupport, cudaPackages ? { }
|
||||||
, cudnnSupport ? cudaSupport
|
, cudnnSupport ? cudaSupport
|
||||||
, ncclSupport ? false
|
, ncclSupport ? false
|
||||||
, pythonSupport ? false, python ? null, numpy ? null
|
, pythonSupport ? false, python ? null, numpy ? null
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
, fetchpatch
|
, fetchpatch
|
||||||
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi
|
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi
|
||||||
, onebitSGDSupport ? false
|
, onebitSGDSupport ? false
|
||||||
, cudaSupport ? false, cudaPackages ? {}, addOpenGLRunpath, cudatoolkit, nvidia_x11
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport, cudaPackages ? { }, addOpenGLRunpath, cudatoolkit, nvidia_x11
|
||||||
, cudnnSupport ? cudaSupport
|
, cudnnSupport ? cudaSupport
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
, config
|
, config
|
||||||
, lib
|
, lib
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, lang ? "en"
|
, lang ? "en"
|
||||||
, webdoc ? false
|
, webdoc ? false
|
||||||
, version ? null
|
, version ? null
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, stdenv, lib, fetchurl, fetchpatch, bash, cmake
|
{ config, stdenv, lib, fetchurl, fetchpatch, bash, cmake
|
||||||
, opencv3, gtest, blas, gomp, llvmPackages, perl
|
, opencv3, gtest, blas, gomp, llvmPackages, perl
|
||||||
, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}, nvidia_x11
|
, cudaSupport ? config.cudaSupport, cudaPackages ? { }, nvidia_x11
|
||||||
, cudnnSupport ? cudaSupport
|
, cudnnSupport ? cudaSupport
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ mkDerivation, lib, fetchFromGitHub, cmake, boost179, ceres-solver, eigen,
|
{ mkDerivation, lib, fetchFromGitHub, cmake, boost179, ceres-solver, eigen,
|
||||||
freeimage, glog, libGLU, glew, qtbase,
|
freeimage, glog, libGLU, glew, qtbase,
|
||||||
cudaSupport ? false, cudaPackages }:
|
config,
|
||||||
|
cudaSupport ? config.cudaSupport, cudaPackages }:
|
||||||
|
|
||||||
assert cudaSupport -> cudaPackages != { };
|
assert cudaSupport -> cudaPackages != { };
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit
|
{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit
|
||||||
, singlePrec ? true
|
, singlePrec ? true
|
||||||
|
, config
|
||||||
, enableMpi ? false
|
, enableMpi ? false
|
||||||
, enableCuda ? false
|
, enableCuda ? config.cudaSupport
|
||||||
, cpuAcceleration ? null
|
, cpuAcceleration ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ backendStdenv.mkDerivation rec {
|
|||||||
(lib.getLib libtiff)
|
(lib.getLib libtiff)
|
||||||
qt6Packages.qtwayland
|
qt6Packages.qtwayland
|
||||||
rdma-core
|
rdma-core
|
||||||
ucx
|
(ucx.override { enableCuda = false; }) # Avoid infinite recursion
|
||||||
xorg.libxshmfence
|
xorg.libxshmfence
|
||||||
xorg.libxkbfile
|
xorg.libxkbfile
|
||||||
] ++ (lib.optionals (lib.versionAtLeast version "12.1") (map lib.getLib ([
|
] ++ (lib.optionals (lib.versionAtLeast version "12.1") (map lib.getLib ([
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
, clblas
|
, clblas
|
||||||
, doxygen
|
, doxygen
|
||||||
, buildDocs ? false
|
, buildDocs ? false
|
||||||
, cudaSupport ? false
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
, darwin
|
, darwin
|
||||||
}:
|
}:
|
||||||
|
|||||||
@@ -4,10 +4,11 @@
|
|||||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||||
, avx2Support ? stdenv.hostPlatform.avx2Support
|
, avx2Support ? stdenv.hostPlatform.avx2Support
|
||||||
, avx512Support ? stdenv.hostPlatform.avx512Support
|
, avx512Support ? stdenv.hostPlatform.avx512Support
|
||||||
|
, config
|
||||||
# Enable NIVIA GPU support
|
# Enable NIVIA GPU support
|
||||||
# Note, that this needs to be built on a system with a GPU
|
# Note, that this needs to be built on a system with a GPU
|
||||||
# present for the tests to succeed.
|
# present for the tests to succeed.
|
||||||
, enableCuda ? false
|
, enableCuda ? config.cudaSupport
|
||||||
# type of GPU architecture
|
# type of GPU architecture
|
||||||
, nvidiaArch ? "sm_60"
|
, nvidiaArch ? "sm_60"
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
, opencv
|
, opencv
|
||||||
, pcre
|
, pcre
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
, x11Support ? false
|
, x11Support ? false
|
||||||
, libX11
|
, libX11
|
||||||
, cairo
|
, cairo
|
||||||
, enableCuda ? false
|
, config
|
||||||
|
, enableCuda ? config.cudaSupport
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
, glfw
|
, glfw
|
||||||
, libGLU
|
, libGLU
|
||||||
, curl
|
, curl
|
||||||
, cudaSupport ? config.cudaSupport or false, cudaPackages ? {}
|
, cudaSupport ? config.cudaSupport, cudaPackages ? { }
|
||||||
, enablePython ? false, pythonPackages ? null
|
, enablePython ? false, pythonPackages ? null
|
||||||
, enableGUI ? false,
|
, enableGUI ? false,
|
||||||
}:
|
}:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ config, stdenv, lib, fetchFromGitHub, cmake, gtest, doCheck ? true
|
{ config, stdenv, lib, fetchFromGitHub, cmake, gtest, doCheck ? true
|
||||||
, cudaSupport ? config.cudaSupport or false, openclSupport ? false, mpiSupport ? false, javaWrapper ? false, hdfsSupport ? false
|
, cudaSupport ? config.cudaSupport, openclSupport ? false, mpiSupport ? false, javaWrapper ? false, hdfsSupport ? false
|
||||||
, rLibrary ? false, cudaPackages, opencl-headers, ocl-icd, boost, llvmPackages, openmpi, openjdk, swig, hadoop, R, rPackages }:
|
, rLibrary ? false, cudaPackages, opencl-headers, ocl-icd, boost, llvmPackages, openmpi, openjdk, swig, hadoop, R, rPackages }:
|
||||||
|
|
||||||
assert doCheck -> mpiSupport != true;
|
assert doCheck -> mpiSupport != true;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
, sox
|
, sox
|
||||||
, vid-stab
|
, vid-stab
|
||||||
, darwin
|
, darwin
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? { }
|
, cudaPackages ? { }
|
||||||
, enableJackrack ? stdenv.isLinux
|
, enableJackrack ? stdenv.isLinux
|
||||||
, ladspa-sdk
|
, ladspa-sdk
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
, tbb
|
, tbb
|
||||||
, hostSystem ? "CPP"
|
, hostSystem ? "CPP"
|
||||||
, deviceSystem ? if config.cudaSupport or false then "CUDA" else "OMP"
|
, deviceSystem ? if config.cudaSupport then "CUDA" else "OMP"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Policy for device_vector<T>
|
# Policy for device_vector<T>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
, enableOpenblas ? true, openblas, blas, lapack
|
, enableOpenblas ? true, openblas, blas, lapack
|
||||||
, enableContrib ? true
|
, enableContrib ? true
|
||||||
|
|
||||||
, enableCuda ? (config.cudaSupport or false) &&
|
, enableCuda ? config.cudaSupport &&
|
||||||
stdenv.hostPlatform.isx86_64
|
stdenv.hostPlatform.isx86_64
|
||||||
, cudaPackages ? { }
|
, cudaPackages ? { }
|
||||||
, enableUnfree ? false
|
, enableUnfree ? false
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
, blas
|
, blas
|
||||||
, enableContrib ? true
|
, enableContrib ? true
|
||||||
|
|
||||||
, enableCuda ? (config.cudaSupport or false) && stdenv.hostPlatform.isx86_64
|
, enableCuda ? config.cudaSupport && stdenv.hostPlatform.isx86_64
|
||||||
, enableCublas ? enableCuda
|
, enableCublas ? enableCuda
|
||||||
, enableCudnn ? false # NOTE: CUDNN has a large impact on closure size so we disable it by default
|
, enableCudnn ? false # NOTE: CUDNN has a large impact on closure size so we disable it by default
|
||||||
, enableCufft ? enableCuda
|
, enableCufft ? enableCuda
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{ lib, stdenv, fetchurl, gfortran, perl, libnl
|
{ lib, stdenv, fetchurl, gfortran, perl, libnl
|
||||||
, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
|
, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
|
||||||
, libpsm2, libfabric, pmix, ucx
|
, libpsm2, libfabric, pmix, ucx
|
||||||
|
, config
|
||||||
# Enable CUDA support
|
# Enable CUDA support
|
||||||
, cudaSupport ? false, cudatoolkit
|
, cudaSupport ? config.cudaSupport, cudatoolkit
|
||||||
|
|
||||||
# Enable the Sun Grid Engine bindings
|
# Enable the Sun Grid Engine bindings
|
||||||
, enableSGE ? false
|
, enableSGE ? false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, lib, stdenv, fetchFromGitHub, cmake, pkg-config, xorg, libGLU
|
{ config, lib, stdenv, fetchFromGitHub, cmake, pkg-config, xorg, libGLU
|
||||||
, libGL, glew, ocl-icd, python3
|
, libGL, glew, ocl-icd, python3
|
||||||
, cudaSupport ? config.cudaSupport or false, cudatoolkit
|
, cudaSupport ? config.cudaSupport, cudatoolkit
|
||||||
# For visibility mostly. The whole approach to cuda architectures and capabilities
|
# For visibility mostly. The whole approach to cuda architectures and capabilities
|
||||||
# will be reworked soon.
|
# will be reworked soon.
|
||||||
, cudaArch ? "compute_37"
|
, cudaArch ? "compute_37"
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
, enableOpencl ? true
|
, enableOpencl ? true
|
||||||
, opencl-headers
|
, opencl-headers
|
||||||
, ocl-icd
|
, ocl-icd
|
||||||
, enableCuda ? false
|
, config
|
||||||
|
, enableCuda ? config.cudaSupport
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
, addOpenGLRunpath
|
, addOpenGLRunpath
|
||||||
}:
|
}:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
, stdenv
|
, stdenv
|
||||||
, cmake
|
, cmake
|
||||||
, cudaPackages ? { }
|
, cudaPackages ? { }
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, nvidia-thrust
|
, nvidia-thrust
|
||||||
, useThrustSourceBuild ? true
|
, useThrustSourceBuild ? true
|
||||||
, pythonSupport ? true
|
, pythonSupport ? true
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ lib, stdenv, fetchurl, gfortran, blas, lapack
|
{ lib, stdenv, fetchurl, gfortran, blas, lapack
|
||||||
, enableCuda ? false, cudatoolkit
|
, config
|
||||||
|
, enableCuda ? config.cudaSupport, cudatoolkit
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, gmp
|
, gmp
|
||||||
, mpfr
|
, mpfr
|
||||||
, enableCuda ? false
|
, config
|
||||||
|
, enableCuda ? config.cudaSupport
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx
|
{ stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx
|
||||||
, enableCuda ? false
|
, config
|
||||||
|
, enableCuda ? config.cudaSupport
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
, enableAvx ? stdenv.hostPlatform.avxSupport
|
, enableAvx ? stdenv.hostPlatform.avxSupport
|
||||||
, enableSse41 ? stdenv.hostPlatform.sse4_1Support
|
, enableSse41 ? stdenv.hostPlatform.sse4_1Support
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl
|
||||||
, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
|
, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
|
||||||
, enableCuda ? false
|
, config
|
||||||
|
, enableCuda ? config.cudaSupport
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
, enableRocm ? false
|
, enableRocm ? false
|
||||||
, rocm-core, rocm-runtime, rocm-device-libs, hip
|
, rocm-core, rocm-runtime, rocm-device-libs, hip
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, gtest
|
, gtest
|
||||||
, doCheck ? true
|
, doCheck ? true
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, ncclSupport ? false
|
, ncclSupport ? false
|
||||||
, rLibrary ? false
|
, rLibrary ? false
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, config
|
, config
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, cupy
|
, cupy
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, filelock
|
, filelock
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
, scipy
|
, scipy
|
||||||
, stdenv
|
, stdenv
|
||||||
# Options:
|
# Options:
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,9 @@
|
|||||||
, snappy
|
, snappy
|
||||||
, zlib
|
, zlib
|
||||||
|
|
||||||
|
, config
|
||||||
# CUDA flags:
|
# CUDA flags:
|
||||||
, cudaSupport ? false
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
|
|
||||||
# MKL:
|
# MKL:
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
, six
|
, six
|
||||||
, nose
|
, nose
|
||||||
, mako
|
, mako
|
||||||
, cudaSupport ? false, cudaPackages
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
|
, cudaPackages ? { }
|
||||||
, openclSupport ? true, ocl-icd, clblas
|
, openclSupport ? true, ocl-icd, clblas
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,14 @@
|
|||||||
, runCommand
|
, runCommand
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
|
|
||||||
|
, config
|
||||||
|
|
||||||
# CUDA-only dependencies:
|
# CUDA-only dependencies:
|
||||||
, addOpenGLRunpath ? null
|
, addOpenGLRunpath ? null
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
|
|
||||||
# CUDA flags:
|
# CUDA flags:
|
||||||
, cudaSupport ? false
|
, cudaSupport ? config.cudaSupport
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
, backports_weakref
|
, backports_weakref
|
||||||
, tensorflow-estimator-bin
|
, tensorflow-estimator-bin
|
||||||
, tensorboard
|
, tensorboard
|
||||||
, cudaSupport ? false
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
, zlib
|
, zlib
|
||||||
, python
|
, python
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
# that in nix as well. It would make some things easier and less confusing, but
|
# that in nix as well. It would make some things easier and less confusing, but
|
||||||
# it would also make the default tensorflow package unfree. See
|
# it would also make the default tensorflow package unfree. See
|
||||||
# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
|
# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
|
||||||
, cudaSupport ? false
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? { }
|
, cudaPackages ? { }
|
||||||
, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
|
, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
|
||||||
, mklSupport ? false, mkl
|
, mklSupport ? false, mkl
|
||||||
|
|||||||
@@ -11,8 +11,9 @@
|
|||||||
, setuptools
|
, setuptools
|
||||||
, six
|
, six
|
||||||
, libgpuarray
|
, libgpuarray
|
||||||
, cudaSupport ? false, cudaPackages ? {}
|
, config
|
||||||
, cudnnSupport ? false
|
, cudaSupport ? config.cudaSupport, cudaPackages ? { }
|
||||||
|
, cudnnSupport ? cudaSupport
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, buildPythonPackage, python,
|
{ stdenv, lib, fetchFromGitHub, buildPythonPackage, python,
|
||||||
cudaSupport ? false, cudaPackages, magma,
|
config, cudaSupport ? config.cudaSupport, cudaPackages, magma,
|
||||||
useSystemNccl ? true,
|
useSystemNccl ? true,
|
||||||
MPISupport ? false, mpi,
|
MPISupport ? false, mpi,
|
||||||
buildDocs ? false,
|
buildDocs ? false,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, boost
|
, boost
|
||||||
, cmake
|
, cmake
|
||||||
|
, config
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
, eigen
|
, eigen
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
@@ -14,7 +15,7 @@
|
|||||||
, openssl
|
, openssl
|
||||||
, writeShellScriptBin
|
, writeShellScriptBin
|
||||||
, enableAVX2 ? stdenv.hostPlatform.avx2Support
|
, enableAVX2 ? stdenv.hostPlatform.avx2Support
|
||||||
, backend ? "opencl"
|
, backend ? if config.cudaSupport then "cuda" else "opencl"
|
||||||
, enableBigBoards ? false
|
, enableBigBoards ? false
|
||||||
, enableContrib ? false
|
, enableContrib ? false
|
||||||
, enableTcmalloc ? true
|
, enableTcmalloc ? true
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
, svt-av1
|
, svt-av1
|
||||||
, vulkan-loader
|
, vulkan-loader
|
||||||
, libappindicator
|
, libappindicator
|
||||||
, cudaSupport ? false
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, python3Packages, stdenv
|
{ cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, python3Packages, stdenv
|
||||||
|
, config
|
||||||
, enableCfp ? true
|
, enableCfp ? true
|
||||||
, enableCuda ? false
|
, enableCuda ? config.cudaSupport
|
||||||
, enableFortran ? builtins.elem stdenv.targetPlatform.system gfortran.meta.platforms
|
, enableFortran ? builtins.elem stdenv.targetPlatform.system gfortran.meta.platforms
|
||||||
, enableOpenMP ? true
|
, enableOpenMP ? true
|
||||||
, enablePython ? true
|
, enablePython ? true
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ cmake, fetchFromGitHub, makeWrapper, opencv3, lib, stdenv, ocl-icd, opencl-headers, OpenCL
|
{ cmake, fetchFromGitHub, makeWrapper, opencv3, lib, stdenv, ocl-icd, opencl-headers, OpenCL
|
||||||
, cudaSupport ? false, cudatoolkit ? null
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport, cudatoolkit ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
, addOpenGLRunpath
|
, addOpenGLRunpath
|
||||||
, config
|
, config
|
||||||
, cudaPackages ? {}
|
, cudaPackages ? {}
|
||||||
, cudaSupport ? config.cudaSupport or false
|
, cudaSupport ? config.cudaSupport
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, opencl-headers
|
, opencl-headers
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ lib, gccStdenv, fetchFromGitLab, cudatoolkit
|
{ lib, gccStdenv, fetchFromGitLab, cudatoolkit
|
||||||
, cudaSupport ? false
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
, pkg-config }:
|
, pkg-config }:
|
||||||
|
|
||||||
gccStdenv.mkDerivation rec {
|
gccStdenv.mkDerivation rec {
|
||||||
|
|||||||
@@ -4207,7 +4207,7 @@ with pkgs;
|
|||||||
libtensorflow = python3.pkgs.tensorflow.libtensorflow;
|
libtensorflow = python3.pkgs.tensorflow.libtensorflow;
|
||||||
|
|
||||||
libtorch-bin = callPackage ../development/libraries/science/math/libtorch/bin.nix {
|
libtorch-bin = callPackage ../development/libraries/science/math/libtorch/bin.nix {
|
||||||
cudaSupport = config.cudaSupport or false;
|
inherit (config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
tensorflow-lite = callPackage ../development/libraries/science/math/tensorflow-lite { };
|
tensorflow-lite = callPackage ../development/libraries/science/math/tensorflow-lite { };
|
||||||
@@ -10904,7 +10904,7 @@ with pkgs;
|
|||||||
|
|
||||||
nvidia-thrust-intel = callPackage ../development/libraries/nvidia-thrust {
|
nvidia-thrust-intel = callPackage ../development/libraries/nvidia-thrust {
|
||||||
hostSystem = "TBB";
|
hostSystem = "TBB";
|
||||||
deviceSystem = if config.cudaSupport or false then "CUDA" else "TBB";
|
deviceSystem = if config.cudaSupport then "CUDA" else "TBB";
|
||||||
};
|
};
|
||||||
|
|
||||||
nvidia-thrust-cuda = callPackage ../development/libraries/nvidia-thrust {
|
nvidia-thrust-cuda = callPackage ../development/libraries/nvidia-thrust {
|
||||||
@@ -15169,7 +15169,7 @@ with pkgs;
|
|||||||
|
|
||||||
colm = callPackage ../development/compilers/colm { };
|
colm = callPackage ../development/compilers/colm { };
|
||||||
|
|
||||||
colmap = libsForQt5.callPackage ../applications/science/misc/colmap { cudaSupport = config.cudaSupport or false; };
|
colmap = libsForQt5.callPackage ../applications/science/misc/colmap { inherit (config) cudaSupport; };
|
||||||
colmapWithCuda = colmap.override { cudaSupport = true; };
|
colmapWithCuda = colmap.override { cudaSupport = true; };
|
||||||
|
|
||||||
chickenPackages_4 = callPackage ../development/compilers/chicken/4 { };
|
chickenPackages_4 = callPackage ../development/compilers/chicken/4 { };
|
||||||
@@ -39361,7 +39361,7 @@ with pkgs;
|
|||||||
### SCIENCE / MATH
|
### SCIENCE / MATH
|
||||||
|
|
||||||
caffe = callPackage ../applications/science/math/caffe ({
|
caffe = callPackage ../applications/science/math/caffe ({
|
||||||
cudaSupport = config.cudaSupport or false;
|
inherit (config) cudaSupport;
|
||||||
cudaPackages = cudaPackages_10_1;
|
cudaPackages = cudaPackages_10_1;
|
||||||
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
||||||
blas = openblas;
|
blas = openblas;
|
||||||
@@ -39376,7 +39376,7 @@ with pkgs;
|
|||||||
stdenv = gcc7Stdenv;
|
stdenv = gcc7Stdenv;
|
||||||
inherit (linuxPackages) nvidia_x11;
|
inherit (linuxPackages) nvidia_x11;
|
||||||
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
opencv3 = opencv3WithoutCuda; # Used only for image loading.
|
||||||
cudaSupport = config.cudaSupport or false;
|
inherit (config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
dap = callPackage ../applications/science/math/dap { };
|
dap = callPackage ../applications/science/math/dap { };
|
||||||
|
|||||||
@@ -117,6 +117,12 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cudaSupport = mkMassRebuild {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
feature = "build packages with CUDA support by default";
|
||||||
|
};
|
||||||
|
|
||||||
showDerivationWarnings = mkOption {
|
showDerivationWarnings = mkOption {
|
||||||
type = types.listOf (types.enum [ "maintainerless" ]);
|
type = types.listOf (types.enum [ "maintainerless" ]);
|
||||||
default = [];
|
default = [];
|
||||||
|
|||||||
@@ -1820,7 +1820,7 @@ self: super: with self; {
|
|||||||
chai = callPackage ../development/python-modules/chai { };
|
chai = callPackage ../development/python-modules/chai { };
|
||||||
|
|
||||||
chainer = callPackage ../development/python-modules/chainer {
|
chainer = callPackage ../development/python-modules/chainer {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
chainmap = callPackage ../development/python-modules/chainmap { };
|
chainmap = callPackage ../development/python-modules/chainmap { };
|
||||||
@@ -5290,13 +5290,13 @@ self: super: with self; {
|
|||||||
jax-jumpy = callPackage ../development/python-modules/jax-jumpy { };
|
jax-jumpy = callPackage ../development/python-modules/jax-jumpy { };
|
||||||
|
|
||||||
jaxlib-bin = callPackage ../development/python-modules/jaxlib/bin.nix {
|
jaxlib-bin = callPackage ../development/python-modules/jaxlib/bin.nix {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
jaxlib-build = callPackage ../development/python-modules/jaxlib rec {
|
jaxlib-build = callPackage ../development/python-modules/jaxlib rec {
|
||||||
inherit (pkgs.darwin) cctools;
|
inherit (pkgs.darwin) cctools;
|
||||||
# Some platforms don't have `cudaSupport` defined, hence the need for 'or false'.
|
# Some platforms don't have `cudaSupport` defined, hence the need for 'or false'.
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
IOKit = pkgs.darwin.apple_sdk_11_0.IOKit;
|
IOKit = pkgs.darwin.apple_sdk_11_0.IOKit;
|
||||||
protobuf = pkgs.protobuf3_20; # jaxlib-build 0.3.15 won't build with protobuf 3.21
|
protobuf = pkgs.protobuf3_20; # jaxlib-build 0.3.15 won't build with protobuf 3.21
|
||||||
};
|
};
|
||||||
@@ -5841,7 +5841,7 @@ self: super: with self; {
|
|||||||
|
|
||||||
libgpuarray = callPackage ../development/python-modules/libgpuarray {
|
libgpuarray = callPackage ../development/python-modules/libgpuarray {
|
||||||
clblas = pkgs.clblas.override { inherit (self) boost; };
|
clblas = pkgs.clblas.override { inherit (self) boost; };
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
libiio = (toPythonModule (pkgs.libiio.override { inherit python; })).python;
|
libiio = (toPythonModule (pkgs.libiio.override { inherit python; })).python;
|
||||||
@@ -7156,7 +7156,7 @@ self: super: with self; {
|
|||||||
num2words = callPackage ../development/python-modules/num2words { };
|
num2words = callPackage ../development/python-modules/num2words { };
|
||||||
|
|
||||||
numba = callPackage ../development/python-modules/numba {
|
numba = callPackage ../development/python-modules/numba {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
numbaWithCuda = self.numba.override {
|
numbaWithCuda = self.numba.override {
|
||||||
@@ -7324,7 +7324,7 @@ self: super: with self; {
|
|||||||
openai-triton-bin = callPackage ../development/python-modules/openai-triton/bin.nix { };
|
openai-triton-bin = callPackage ../development/python-modules/openai-triton/bin.nix { };
|
||||||
|
|
||||||
openai-whisper = callPackage ../development/python-modules/openai-whisper {
|
openai-whisper = callPackage ../development/python-modules/openai-whisper {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
openant = callPackage ../development/python-modules/openant { };
|
openant = callPackage ../development/python-modules/openant { };
|
||||||
@@ -12371,12 +12371,12 @@ self: super: with self; {
|
|||||||
tensorboardx = callPackage ../development/python-modules/tensorboardx { };
|
tensorboardx = callPackage ../development/python-modules/tensorboardx { };
|
||||||
|
|
||||||
tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix {
|
tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
tensorflow-build = callPackage ../development/python-modules/tensorflow {
|
tensorflow-build = callPackage ../development/python-modules/tensorflow {
|
||||||
inherit (pkgs.darwin) cctools;
|
inherit (pkgs.darwin) cctools;
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
inherit (self.tensorflow-bin) cudaPackages;
|
inherit (self.tensorflow-bin) cudaPackages;
|
||||||
inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security;
|
inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security;
|
||||||
flatbuffers-core = pkgs.flatbuffers;
|
flatbuffers-core = pkgs.flatbuffers;
|
||||||
@@ -12495,7 +12495,7 @@ self: super: with self; {
|
|||||||
theano-pymc = callPackage ../development/python-modules/theano-pymc { };
|
theano-pymc = callPackage ../development/python-modules/theano-pymc { };
|
||||||
|
|
||||||
theano = callPackage ../development/python-modules/theano rec {
|
theano = callPackage ../development/python-modules/theano rec {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
cudnnSupport = cudaSupport;
|
cudnnSupport = cudaSupport;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -12662,9 +12662,9 @@ self: super: with self; {
|
|||||||
toposort = callPackage ../development/python-modules/toposort { };
|
toposort = callPackage ../development/python-modules/toposort { };
|
||||||
|
|
||||||
torch = callPackage ../development/python-modules/torch {
|
torch = callPackage ../development/python-modules/torch {
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
inherit (pkgs.config) cudaSupport;
|
||||||
magma =
|
magma =
|
||||||
if pkgs.config.cudaSupport or false
|
if pkgs.config.cudaSupport
|
||||||
then pkgs.magma-cuda-static
|
then pkgs.magma-cuda-static
|
||||||
else pkgs.magma;
|
else pkgs.magma;
|
||||||
inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate CoreServices;
|
inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate CoreServices;
|
||||||
|
|||||||
Reference in New Issue
Block a user