Commit 8af89d08 authored by Connor Baker's avatar Connor Baker
Browse files

cudaPackages: allow expressions to be used with older versions of CUDA

parent 218fe975
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ buildRedist {

  allowFHSReferences = true;

  buildInputs = [
    gmp
  ]
  buildInputs =
    # only needs gmp from 12.0 and on
    lib.optionals (cudaAtLeast "12.0") [ gmp ]
    # aarch64, sbsa needs expat
    ++ lib.optionals backendStdenv.hostPlatform.isAarch64 [ expat ]
    # From 12.5, cuda-gdb comes with Python TUI wrappers
+6 −0
Original line number Diff line number Diff line
{
  backendStdenv,
  buildRedist,
  cuda_cupti,
  cudaAtLeast,
  lib,
}:
buildRedist {
  redistName = "cuda";
@@ -10,6 +13,9 @@ buildRedist {

  outputs = [
    "out"
  ]
  # The `bin` and `lib` output are only available on SBSA starting with CUDA 11.8.
  ++ lib.optionals (backendStdenv.hostRedistSystem != "linux-sbsa" || cudaAtLeast "11.8") [
    "bin"
    "lib"
  ];
+8 −4
Original line number Diff line number Diff line
{ buildRedist }:
{
  buildRedist,
  cudaAtLeast,
  lib,
}:
buildRedist {
  redistName = "cuda";
  pname = "cuda_nvrtc";
@@ -8,9 +12,9 @@ buildRedist {
    "dev"
    "include"
    "lib"
    "static"
    "stubs"
  ];
  ]
  ++ lib.optionals (cudaAtLeast "11.5") [ "static" ]
  ++ [ "stubs" ];

  allowFHSReferences = true;

+5 −0
Original line number Diff line number Diff line
{
  backendStdenv,
  buildRedist,
  cudaMajorMinorVersion,
  lib,
}:
buildRedist {
@@ -17,6 +18,10 @@ buildRedist {

  autoPatchelfIgnoreMissingDeps = [
    "libnvcudla.so"
  ]
  ++ lib.optionals (cudaMajorMinorVersion == "11.8") [
    "libcuda.so.1"
    "libnvdla_runtime.so"
  ];

  platformAssertions = [
+6 −1
Original line number Diff line number Diff line
{
  buildRedist,
  cudaOlder,
  lib,
  numactl,
  rdma-core,
}:
@@ -17,14 +19,17 @@ buildRedist {

  allowFHSReferences = true;

  # TODO(@connorbaker): At some point before 12.6, libcufile depends on libcublas.
  buildInputs = [
    numactl
    rdma-core
  ];

  # Before 11.7 libcufile depends on itself for some reason.
  autoPatchelfIgnoreMissingDeps = [
    "libcuda.so.1"
  ];
  ]
  ++ lib.optionals (cudaOlder "11.7") [ "libcufile.so.0" ];

  meta = {
    description = "Library to leverage GDS technology";
Loading