!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

279 Members
CUDA packages maintenance and support in nixpkgs | https://github.com/orgs/NixOS/projects/27/ | https://nixos.org/manual/nixpkgs/unstable/#cuda56 Servers

Load older messages


SenderMessageTime
1 Nov 2025
@hexa:lossy.networkhexashouldn't that be propagatedNativeBuildInputs?02:10:31
@connorbaker:matrix.orgconnor (he/him) For backendStdenv.cc in cuda_nvcc.nix or for setupCudaHook in buildRedist/default.nix? 02:11:19
@hexa:lossy.networkhexacuda_nvcc.nix02:12:14
@ss:someonex.netSomeoneSerge (back on matrix)Here's the old logic: https://github.com/NixOS/nixpkgs/blob/99fe7bea35ed3ca8de66188d2337cb3e7c6e83e7/pkgs/development/cuda-modules/_cuda/fixups/cuda_nvcc.nix#L5002:12:30
@hexa:lossy.networkhexait's too late here, going to sleep02:13:19
@connorbaker:matrix.orgconnor (he/him) backendStdenv.cc needs to be in propagatedBuildInputs; makeSetupHook does the same thing 02:13:21
@ss:someonex.netSomeoneSerge (back on matrix)We do reference the host compiler from nvcc and from the hook, but we do not propagate02:13:46
@ss:someonex.netSomeoneSerge (back on matrix)Tbh the hook referencing the compiler looks sus too, but my memory's all gone02:16:08
@ss:someonex.netSomeoneSerge (back on matrix) Ah! I see now why the hook was "ok": it would only propagate stuff if cudaPropagateToOutput is explicitly set by the downstream derivation 02:21:42
@ss:someonex.netSomeoneSerge (back on matrix)Ok but the onnxruntime part I didn't look at/don't know don't understand02:23:57
@ss:someonex.netSomeoneSerge (back on matrix) My best guess is it's because an extraneous propagatedBuildInputs = [ setupCudaHook ] also slipped in into buildRedist.nix, but tbh I'm still struggling to explain how this leads to the extra reference 02:51:56
@ss:someonex.netSomeoneSerge (back on matrix)Another person on gh saying they found a legit nvcc reference in libonnxruntime_providers_cuda, so I think this can't be explained by hooks alone02:56:09
@connorbaker:matrix.orgconnor (he/him)Is it possible onnxruntime does JIT compilation02:57:40
@ss:someonex.netSomeoneSerge (back on matrix)Yeah that what I'm wondering03:10:52
@ss:someonex.netSomeoneSerge (back on matrix)Nope03:12:13
@ss:someonex.netSomeoneSerge (back on matrix)More mysteries! https://github.com/NixOS/nixpkgs/pull/457424#issuecomment-347553717403:15:11
@ss:someonex.netSomeoneSerge (back on matrix) connor (burnt/out) (UTC-7): when you started propagating crt/host_config.h from cudart, did you also drop the manual nvcc from any leaf packages? Figure you might be quicker to answer than me reading or running tests 03:58:51
@connorbaker:matrix.orgconnor (he/him)Manual NVCC?04:00:59
@ss:someonex.netSomeoneSerge (back on matrix)Like we had buildInputs = [ nvcc ] in a bunch of places because of the host_config.h dependency04:03:40
@ss:someonex.netSomeoneSerge (back on matrix)Which will not have been needed if cudart propagates it04:03:57
@connorbaker:matrix.orgconnor (he/him)I don’t remember honestly I think I also had it propagate because headers need to be in buildInputs to be discovered04:05:08
@connorbaker:matrix.orgconnor (he/him) I just looked through the commits for the CUDA 13 PR; I didn't see removal of nvcc from buildInputs anywhere 04:13:19
@ss:someonex.netSomeoneSerge (back on matrix)Aight this may well be my favourite Halloween story so far, and still open-ended: https://github.com/NixOS/nixpkgs/pull/457424#issuecomment-347574251004:17:14
@ss:someonex.netSomeoneSerge (back on matrix)I can't explain this04:19:45
@ss:someonex.netSomeoneSerge (back on matrix)No way04:19:48
@connorbaker:matrix.orgconnor (he/him)can you imagine if it's non-deterministic04:24:09
@connorbaker:matrix.orgconnor (he/him)or only occurs if there are multiple capabilities04:24:16
@connorbaker:matrix.orgconnor (he/him)I mean I was able to reproduce with a single capability04:24:54
@ss:someonex.netSomeoneSerge (back on matrix)Yeah. If I were to try to explain it, I'd start checking if they e.g. try to copy CUDAToolkit_INCLUDE_DIRS or any other FindCUDAToolkit's targets' properties into their own targets04:31:09
@connorbaker:matrix.orgconnor (he/him)

For what it's worth, I looked through the tree and here are the packages I found where cuda_nvcc ends up in buildInputs in some way. This list doesn't include other way it could end up in the closure -- string interpolation, environment variables, cmakeFlags, etc.

  • ./pkgs/by-name/ba/basalt-monado/package.nix
  • ./pkgs/by-name/dl/dlib/package.nix
  • ./pkgs/by-name/fr/frei0r/package.nix
  • ./pkgs/by-name/gp/gpu-burn/package.nix
  • ./pkgs/by-name/ka/katago/package.nix
  • ./pkgs/by-name/ko/koboldcpp/package.nix
  • ./pkgs/by-name/ma/mathematica/generic.nix
  • ./pkgs/by-name/mf/mfaktc/package.nix
  • ./pkgs/by-name/mo/monado/package.nix
  • ./pkgs/by-name/xm/xmrig-cuda/package.nix
  • ./pkgs/by-name/xm/xmrig-cuda-mo/package.nix
  • ./pkgs/development/cuda-modules/packages/cuda_cudart.nix
  • ./pkgs/development/cuda-modules/packages/nccl.nix
  • ./pkgs/development/libraries/ffmpeg/generic.nix
  • ./pkgs/development/python-modules/causal-conv1d/default.nix
  • ./pkgs/development/python-modules/cupy/default.nix
  • ./pkgs/development/python-modules/jaxlib/default.nix
  • ./pkgs/development/python-modules/lightgbm/default.nix
  • ./pkgs/development/python-modules/mamba-ssm/default.nix
  • ./pkgs/development/python-modules/tensorflow/default.nix
  • ./pkgs/development/python-modules/torch/source/default.nix
  • ./pkgs/development/python-modules/warp-lang/default.nix
04:32:50

Show newer messages


Back to Room ListRoom Version: 9