Commit 49a82e74 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

cudaPackages_12_9.cuda_cccl: patch to fix missing _CCCL_PP_SPLICE_WITH_IMPL20 in preprocessor.h

parent 4fd4eb7b
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
{
  buildRedist,
  cudaAtLeast,
  cudaOlder,
  lib,
  fetchpatch,
}:
buildRedist {
  redistName = "cuda";
@@ -23,6 +25,18 @@ buildRedist {
    rmdir -v "$PWD/include/cccl"
  '';

  patches = lib.optionals (cudaAtLeast "12.9" && cudaOlder "13.0") [
    # Fix missing _CCCL_PP_SPLICE_WITH_IMPL20 in preprocessor.h
    # https://github.com/NVIDIA/cccl/issues/4967
    # https://github.com/NVIDIA/cccl/pull/4972
    (fetchpatch {
      name = "fix-missing-_CCCL_PP_SPLICE_WITH_IMPL20";
      url = "https://github.com/NVIDIA/cccl/commit/2c2276d8b19d737cb16811ce2eb761030f472e60.patch";
      stripLen = 1;
      hash = "sha256-hYfMFsd7Y8CwuNGaPYG6uEB+lg1TmWSIIU5ToVMULKY=";
    })
  ];

  # NVIDIA, in their wisdom, expect CCCL to be a directory inside include.
  # https://github.com/NVIDIA/cutlass/blob/087c84df83d254b5fb295a7a408f1a1d554085cf/CMakeLists.txt#L773
  postInstall = lib.optionalString (cudaAtLeast "13.0") ''