mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 17:19:58 +00:00
cuda-bindings loads libcuda and libnvidia-ml by absolute path from the NixOS driver link. Unlike libraries that carry the driver link in their RUNPATH, that ignores LD_LIBRARY_PATH, so on non-NixOS hosts where the driver is exposed that way (nixglhost, container runtimes) every cuda.bindings driver and NVML call fails. Packages that probe the GPU through cuda.bindings then silently fall back: CUTLASS DSL, for one, compiles for its default sm_100a and the kernels fail to launch with cudaErrorNoKernelImageForDevice. Try the soname first and fall back to the configured path, matching the dynamic linker's order for RUNPATH-linked libraries. On NixOS the soname lookup finds nothing and the driver link is used as before. This affects NVML in the 12.9 and 13.1 through 13.4 patches, and libcuda in the 13.4 patch only; earlier versions load libcuda by soname, which the patches leave alone. 13.0 has no NVML module. Assisted-by: Claude Code (Claude Opus 5.5, claude-opus-5-5)
6.1 KiB
6.1 KiB