Loading pkgs/development/cuda-modules/packages/cuda_nvcc.nix +14 −3 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ cuda_cccl, lib, libnvvm, makeBinaryWrapper, }: buildRedist (finalAttrs: { redistName = "cuda"; Loading @@ -22,6 +23,10 @@ buildRedist (finalAttrs: { # The nvcc and cicc binaries contain hard-coded references to /usr allowFHSReferences = true; nativeBuildInputs = [ makeBinaryWrapper ]; # Entries here will be in nativeBuildInputs when cuda_nvcc is in nativeBuildInputs propagatedBuildInputs = [ setupCudaHook ]; Loading Loading @@ -144,13 +149,19 @@ buildRedist (finalAttrs: { EOF '' # Add the dependency on backendStdenv.cc to the nvcc.profile. # NOTE: NVCC explodes in horrifying fashion if GCC is not on PATH -- it fails even before # reading nvcc.profile! + '' nixLog "adding backendStdenv.cc to nvcc.profile" nixLog "setting compiler-bindir to backendStdenv.cc in nvcc.profile" cat << EOF >> "''${!outputBin:?}/bin/nvcc.profile" # Fix a compatible backend compiler PATH += "${backendStdenv.cc}/bin": compiler-bindir = ${backendStdenv.cc}/bin EOF nixLog "wrapping nvcc to add backendStdenv.cc to its PATH" wrapProgramBinary \ "''${!outputBin:?}/bin/nvcc" \ --prefix PATH : ${lib.makeBinPath [ backendStdenv.cc ]} '' ); Loading pkgs/development/cuda-modules/packages/setupCudaHook/package.nix +0 −3 Original line number Diff line number Diff line Loading @@ -5,9 +5,6 @@ makeSetupHook { substitutions.setupCudaHook = placeholder "out"; # Point NVCC at a compatible compiler substitutions.ccRoot = "${backendStdenv.cc}"; # Required in addition to ccRoot as otherwise bin/gcc is looked up # when building CMakeCUDACompilerId.cu substitutions.ccFullPath = "${backendStdenv.cc}/bin/${backendStdenv.cc.targetPrefix}c++"; Loading pkgs/development/cuda-modules/packages/setupCudaHook/setup-cuda-hook.sh +0 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,6 @@ setupCUDAToolkitCompilers() { export CUDAHOSTCXX="@ccFullPath@" fi appendToVar NVCC_PREPEND_FLAGS "--compiler-bindir=@ccRoot@/bin" # NOTE: We set -Xfatbin=-compress-all, which reduces the size of the compiled # binaries. If binaries grow over 2GB, they will fail to link. This is a problem for us, as # the default set of CUDA capabilities we build can regularly cause this to occur (for Loading Loading
pkgs/development/cuda-modules/packages/cuda_nvcc.nix +14 −3 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ cuda_cccl, lib, libnvvm, makeBinaryWrapper, }: buildRedist (finalAttrs: { redistName = "cuda"; Loading @@ -22,6 +23,10 @@ buildRedist (finalAttrs: { # The nvcc and cicc binaries contain hard-coded references to /usr allowFHSReferences = true; nativeBuildInputs = [ makeBinaryWrapper ]; # Entries here will be in nativeBuildInputs when cuda_nvcc is in nativeBuildInputs propagatedBuildInputs = [ setupCudaHook ]; Loading Loading @@ -144,13 +149,19 @@ buildRedist (finalAttrs: { EOF '' # Add the dependency on backendStdenv.cc to the nvcc.profile. # NOTE: NVCC explodes in horrifying fashion if GCC is not on PATH -- it fails even before # reading nvcc.profile! + '' nixLog "adding backendStdenv.cc to nvcc.profile" nixLog "setting compiler-bindir to backendStdenv.cc in nvcc.profile" cat << EOF >> "''${!outputBin:?}/bin/nvcc.profile" # Fix a compatible backend compiler PATH += "${backendStdenv.cc}/bin": compiler-bindir = ${backendStdenv.cc}/bin EOF nixLog "wrapping nvcc to add backendStdenv.cc to its PATH" wrapProgramBinary \ "''${!outputBin:?}/bin/nvcc" \ --prefix PATH : ${lib.makeBinPath [ backendStdenv.cc ]} '' ); Loading
pkgs/development/cuda-modules/packages/setupCudaHook/package.nix +0 −3 Original line number Diff line number Diff line Loading @@ -5,9 +5,6 @@ makeSetupHook { substitutions.setupCudaHook = placeholder "out"; # Point NVCC at a compatible compiler substitutions.ccRoot = "${backendStdenv.cc}"; # Required in addition to ccRoot as otherwise bin/gcc is looked up # when building CMakeCUDACompilerId.cu substitutions.ccFullPath = "${backendStdenv.cc}/bin/${backendStdenv.cc.targetPrefix}c++"; Loading
pkgs/development/cuda-modules/packages/setupCudaHook/setup-cuda-hook.sh +0 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,6 @@ setupCUDAToolkitCompilers() { export CUDAHOSTCXX="@ccFullPath@" fi appendToVar NVCC_PREPEND_FLAGS "--compiler-bindir=@ccRoot@/bin" # NOTE: We set -Xfatbin=-compress-all, which reduces the size of the compiled # binaries. If binaries grow over 2GB, they will fail to link. This is a problem for us, as # the default set of CUDA capabilities we build can regularly cause this to occur (for Loading