Commit Graph

4 Commits

Author SHA1 Message Date
Connor Baker
d7b4eb14e9 cudaPackages: stop leaking build-time paths into runtime closures
Build systems bake absolute paths into installed artifacts: nvcc
records its own location in the linker command lines it embeds, and
CMake freezes whatever it resolved at configure time into exported
targets. Nix counts any store hash as a reference, so a compiler that
is only ever a nativeBuildInput ends up a runtime dependency.

- gdrcopy: gdrcopy_pplat is the only test built with relocatable
  device code, and nvlink embeds its command line, naming both
  cuda_nvcc and the cudart that supplied cudadevrt. Neither is needed
  at runtime: no binary here has libcudart in DT_NEEDED, and
  libcuda.so.1 comes from the driver. CUDA 13 only; on 13.3 the
  closure drops from 688,439,736 to 61,081,560 bytes, and all seven
  releases now have identical reference sets.

- cudnn-frontend: upstream passes CUDAToolkit_INCLUDE_DIRS to
  target_include_directories as a bare absolute path and never
  forwards the dependency, so consumers inherit a build-machine path
  instead of resolving the toolkit themselves. Confine the path to the
  build and export the dependency, so find_package(CUDAToolkit) runs
  in the consumer's environment. Closure drops from 1,360,621,552 to
  171,758,136 bytes. This is load-bearing rather than cosmetic: on
  CUDA 12 crt/ ships in cuda_nvcc and cuda_runtime_api.h includes it,
  so a consumer using only find_package(cudnn_frontend) previously
  relied on that exported path to compile at all.

- libnvshmem: NVSHMEMEnv.cmake bakes every -D*_HOME into
  NVSHMEM_BUILD_VARS, a diagnostic banner that nvshmem-info and
  init.cu only ever print, and substitutes it into an installed header
  so consumers inherit it too. Strip the dev outputs and nvcc; gdrcopy
  and mpi appear in the same string but are genuine runtime
  dependencies. References drop from 16 to 12.

gdrcopy also gains a disallowedRequisites guard so the leak cannot
return unnoticed. libnvshmem deliberately does not: ucx and openmpi
pull nvcc into its closure independently of the banner, so the guard
would fail for reasons unrelated to this change.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 14:55:40 -07:00
Gaetan Lepage
3e1852144b cudaPackages.gdrcopy: 2.5.2 -> 2.6
Diff: https://github.com/NVIDIA/gdrcopy/compare/v2.5.2...v2.6
2026-06-13 12:30:46 +00:00
R. Ryantm
5bac571559 cudaPackages.gdrcopy: 2.5.1 -> 2.5.2 2026-03-17 02:32:25 +00:00
Connor Baker
3a57a460b3 cudaPackages.gdrcopy: init at 2.5.1
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
2025-10-22 13:14:52 -07:00