Skip to content

Commit

Permalink
fix: adapt to breaking llama.cpp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd committed Jan 22, 2025
1 parent 39cef4b commit 7643291
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bindings/utils/compileLLamaCpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ export async function compileLlamaCpp(buildOptions: BuildOptions, compileOptions
if (toolchainFile != null && !cmakeCustomOptions.has("CMAKE_TOOLCHAIN_FILE"))
cmakeToolchainOptions.set("CMAKE_TOOLCHAIN_FILE", toolchainFile);

if (toolchainFile != null &&
buildOptions.gpu === "vulkan" &&
useWindowsLlvm &&
!cmakeCustomOptions.has("GGML_VULKAN_SHADERS_GEN_TOOLCHAIN")
)
cmakeToolchainOptions.set("GGML_VULKAN_SHADERS_GEN_TOOLCHAIN", toolchainFile);

if (buildOptions.gpu === "metal" && process.platform === "darwin" && !cmakeCustomOptions.has("GGML_METAL"))
cmakeCustomOptions.set("GGML_METAL", "1");
else if (!cmakeCustomOptions.has("GGML_METAL"))
Expand Down

0 comments on commit 7643291

Please sign in to comment.