python3Packages.cupy: parallel build

main
Samuel Ainsworth 2 years ago
parent 2133acc806
commit e51d84a97f
  1. 7
      pkgs/development/python-modules/cupy/default.nix

@ -19,8 +19,15 @@ buildPythonPackage rec {
sha256 = "sha256-5ovvA76QGOsOnVztMfDgLerks5nJrKR08rLc+ArmWA8=";
};
# See https://docs.cupy.dev/en/v10.2.0/reference/environment.html. Seting both
# CUPY_NUM_BUILD_JOBS and CUPY_NUM_NVCC_THREADS to NIX_BUILD_CORES results in
# a small amount of thrashing but it turns out there are a large number of
# very short builds and a few extremely long ones, so setting both ends up
# working nicely in practice.
preConfigure = ''
export CUDA_PATH=${cudatoolkit}
export CUPY_NUM_BUILD_JOBS="$NIX_BUILD_CORES"
export CUPY_NUM_NVCC_THREADS="$NIX_BUILD_CORES"
'';
nativeBuildInputs = [

Loading…
Cancel
Save