Unverified Commit 7929bf8f authored by Someone's avatar Someone Committed by GitHub
Browse files

Merge pull request #330038 from KiruyaMomochi/koboldcpp-cuda-fix

koboldcpp: Fix Package Build Failure with CUDA Enabled
parents 3ad9d21c f0ff2935
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
  cublasSupport ? config.cudaSupport,
  # You can find a full list here: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
  # For example if you're on an GTX 1080 that means you're using "Pascal" and you need to pass "sm_60"
  cudaArches ? cudaPackages.cudaFlags.arches or [ ],
  cudaArches ? cudaPackages.cudaFlags.realArches or [ ],

  clblastSupport ? stdenv.isLinux,
  clblast,
@@ -129,7 +129,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
    (makeBool "LLAMA_CLBLAST" clblastSupport)
    (makeBool "LLAMA_VULKAN" vulkanSupport)
    (makeBool "LLAMA_METAL" metalSupport)
    (lib.optionals cublasSupport "CUDA_DOCKER_ARCH=sm_${builtins.head cudaArches}")
    (lib.optionals cublasSupport "CUDA_DOCKER_ARCH=${builtins.head cudaArches}")
  ];

  installPhase = ''
@@ -158,7 +158,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
  postFixup = ''
    wrapPythonProgramsIn "$out/bin" "$pythonPath"
    makeWrapper "$out/bin/koboldcpp.unwrapped" "$out/bin/koboldcpp" \
      --prefix PATH ${lib.makeBinPath [ tk ]} ${libraryPathWrapperArgs}
      --prefix PATH : ${lib.makeBinPath [ tk ]} ${libraryPathWrapperArgs}
  '';

  passthru.updateScript = gitUpdater { rev-prefix = "v"; };