ollama-rocm: fix evaluation error when clr.localGpuTargets is set

This commit is contained in:
Luna Nova
2025-05-08 20:14:24 -07:00
parent 62cab5dbe8
commit ac5c65a71a
+1 -7
View File
@@ -14,7 +14,7 @@
clblast,
libdrm,
rocmPackages,
rocmGpuTargets ? rocmPackages.clr.gpuTargets or [ ],
rocmGpuTargets ? rocmPackages.clr.localGpuTargets or (rocmPackages.clr.gpuTargets or [ ]),
cudaPackages,
cudaArches ? cudaPackages.cudaFlags.realArches or [ ],
autoAddDriverRunpath,
@@ -137,12 +137,6 @@ goBuild (finalAttrs: {
CFLAGS = "-Wno-c++17-extensions -I${rocmPath}/include";
CXXFLAGS = "-Wno-c++17-extensions -I${rocmPath}/include";
}
// lib.optionalAttrs (enableRocm && (rocmPackages.clr.localGpuTargets or false)) {
# If rocm CLR is set to build for an exact set of targets reuse that target list,
# otherwise let ollama use its builtin defaults
HIP_ARCHS = lib.concatStringsSep ";" rocmPackages.clr.localGpuTargets;
}
// lib.optionalAttrs enableCuda { CUDA_PATH = cudaPath; };
nativeBuildInputs =