-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4117b9e
commit ca354cb
Showing
3 changed files
with
68 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
--- a/llama/llama.go | ||
+++ b/llama/llama.go | ||
@@ -52,7 +52,7 @@ | ||
#cgo rocm LDFLAGS: -L${SRCDIR} -lggml_rocm -lhipblas -lamdhip64 -lrocblas | ||
#cgo windows CFLAGS: -Wno-discarded-qualifiers -D_WIN32_WINNT=0x602 | ||
#cgo windows CXXFLAGS: -D_WIN32_WINNT=0x602 | ||
-#cgo windows LDFLAGS: -lmsvcrt -static-libstdc++ -static-libgcc -static | ||
+#cgo windows LDFLAGS: | ||
#cgo windows,amd64 LDFLAGS: -L${SRCDIR}/build/windows-amd64 | ||
#cgo windows,arm64 CFLAGS: -D__aarch64__ -D__ARM_NEON -D__ARM_FEATURE_FMA | ||
#cgo windows,arm64 CXXFLAGS: -D__aarch64__ -D__ARM_NEON -D__ARM_FEATURE_FMA | ||
--- a/ml/backend/ggml/ggml/src/ggml.go | ||
+++ b/ml/backend/ggml/ggml/src/ggml.go | ||
@@ -3,7 +3,6 @@ | ||
// #cgo CXXFLAGS: -std=c++17 | ||
// #cgo CPPFLAGS: -DNDEBUG -DGGML_USE_CPU | ||
// #cgo CPPFLAGS: -I${SRCDIR}/../include -I${SRCDIR}/ggml-cpu | ||
-// #cgo windows LDFLAGS: -lmsvcrt -static -static-libgcc -static-libstdc++ | ||
// #include <stdlib.h> | ||
// #include "ggml-backend.h" | ||
// extern void sink(int level, char *text, void *user_data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- a/discover/path.go | ||
+++ b/discover/path.go | ||
@@ -26,7 +26,7 @@ | ||
var libPath string | ||
switch runtime.GOOS { | ||
case "windows": | ||
- libPath = filepath.Join(filepath.Dir(exe), "lib", "ollama") | ||
+ libPath = filepath.Join(filepath.Dir(exe), "..", "lib", "ollama") | ||
case "linux": | ||
libPath = filepath.Join(filepath.Dir(exe), "..", "lib", "ollama") | ||
case "darwin": | ||
--- a/ml/backend/ggml/ggml/src/ggml.go | ||
+++ b/ml/backend/ggml/ggml/src/ggml.go | ||
@@ -58,7 +58,7 @@ | ||
value = filepath.Dir(exe) | ||
case "windows": | ||
name = "PATH" | ||
- value = filepath.Join(filepath.Dir(exe), "lib", "ollama") | ||
+ value = filepath.Join(filepath.Dir(exe), "..", "lib", "ollama") | ||
default: | ||
name = "LD_LIBRARY_PATH" | ||
value = filepath.Join(filepath.Dir(exe), "..", "lib", "ollama") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters