tree-wide: 'enableCuda ? false' -> 'config.cudaSupport or false' to respect global defaults

This commit is contained in:
Someone Serge 2023-03-31 15:56:07 +03:00
parent 4fafb3b90b
commit 74549ec63b
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4
7 changed files with 14 additions and 7 deletions

View file

@ -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 or false
, cpuAcceleration ? null , cpuAcceleration ? null
}: }:

View file

@ -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 or false
# type of GPU architecture # type of GPU architecture
, nvidiaArch ? "sm_60" , nvidiaArch ? "sm_60"
, cudatoolkit , cudatoolkit

View file

@ -2,7 +2,8 @@
, x11Support ? false , x11Support ? false
, libX11 , libX11
, cairo , cairo
, enableCuda ? false , config
, enableCuda ? config.cudaSupport or false
, cudaPackages , cudaPackages
}: }:

View file

@ -11,7 +11,8 @@
, enableOpencl ? true , enableOpencl ? true
, opencl-headers , opencl-headers
, ocl-icd , ocl-icd
, enableCuda ? false , config
, enableCuda ? config.cudaSupport or false
, cudaPackages , cudaPackages
, addOpenGLRunpath , addOpenGLRunpath
}: }:

View file

@ -1,5 +1,6 @@
{ stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx { stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx
, enableCuda ? false , config
, enableCuda ? config.cudaSupport or false
, cudatoolkit , cudatoolkit
, enableAvx ? stdenv.hostPlatform.avxSupport , enableAvx ? stdenv.hostPlatform.avxSupport
, enableSse41 ? stdenv.hostPlatform.sse4_1Support , enableSse41 ? stdenv.hostPlatform.sse4_1Support

View file

@ -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 or false) then "cuda" else "opencl"
, enableBigBoards ? false , enableBigBoards ? false
, enableContrib ? false , enableContrib ? false
, enableTcmalloc ? true , enableTcmalloc ? true

View file

@ -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 or false
, 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