Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
7ca9605f
Unverified
Commit
7ca9605f
authored
May 30, 2024
by
Jeffrey Morgan
Committed by
GitHub
May 30, 2024
Browse files
speed up tests by only building static lib (#4740)
parent
eb2c443a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
41 deletions
+46
-41
.github/workflows/test.yaml
.github/workflows/test.yaml
+2
-0
llm/generate/gen_darwin.sh
llm/generate/gen_darwin.sh
+44
-41
No files found.
.github/workflows/test.yaml
View file @
7ca9605f
...
@@ -287,6 +287,8 @@ jobs:
...
@@ -287,6 +287,8 @@ jobs:
GOARCH
:
${{ matrix.arch }}
GOARCH
:
${{ matrix.arch }}
CGO_ENABLED
:
'
1'
CGO_ENABLED
:
'
1'
OLLAMA_CPU_TARGET
:
'
static'
OLLAMA_CPU_TARGET
:
'
static'
OLLAMA_SKIP_CPU_GENERATE
:
'
1'
OLLAMA_SKIP_METAL_GENERATE
:
'
1'
steps
:
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
actions/checkout@v4
with
:
with
:
...
...
llm/generate/gen_darwin.sh
View file @
7ca9605f
...
@@ -32,7 +32,7 @@ case "${GOARCH}" in
...
@@ -32,7 +32,7 @@ case "${GOARCH}" in
echo
"Building static library"
echo
"Building static library"
build
build
if
[
-z
"
$OLLAMA_SKIP_CPU_GENERATE
"
]
;
then
#
#
# CPU first for the default library, set up as lowest common denominator for maximum compatibility (including Rosetta)
# CPU first for the default library, set up as lowest common denominator for maximum compatibility (including Rosetta)
#
#
...
@@ -68,6 +68,7 @@ case "${GOARCH}" in
...
@@ -68,6 +68,7 @@ case "${GOARCH}" in
build
build
sign
${
BUILD_DIR
}
/bin/ollama_llama_server
sign
${
BUILD_DIR
}
/bin/ollama_llama_server
compress
compress
fi
;;
;;
"arm64"
)
"arm64"
)
...
@@ -79,6 +80,7 @@ case "${GOARCH}" in
...
@@ -79,6 +80,7 @@ case "${GOARCH}" in
echo
"Building static library"
echo
"Building static library"
build
build
if
[
-z
"
$OLLAMA_SKIP_METAL_GENERATE
"
]
;
then
init_vars
init_vars
CMAKE_DEFS
=
"
${
COMMON_DARWIN_DEFS
}
-DLLAMA_ACCELERATE=on -DCMAKE_SYSTEM_PROCESSOR=
${
ARCH
}
-DCMAKE_OSX_ARCHITECTURES=
${
ARCH
}
-DLLAMA_METAL=on
${
CMAKE_DEFS
}
"
CMAKE_DEFS
=
"
${
COMMON_DARWIN_DEFS
}
-DLLAMA_ACCELERATE=on -DCMAKE_SYSTEM_PROCESSOR=
${
ARCH
}
-DCMAKE_OSX_ARCHITECTURES=
${
ARCH
}
-DLLAMA_METAL=on
${
CMAKE_DEFS
}
"
BUILD_DIR
=
"../build/darwin/
${
ARCH
}
/metal"
BUILD_DIR
=
"../build/darwin/
${
ARCH
}
/metal"
...
@@ -86,6 +88,7 @@ case "${GOARCH}" in
...
@@ -86,6 +88,7 @@ case "${GOARCH}" in
build
build
sign
${
BUILD_DIR
}
/bin/ollama_llama_server
sign
${
BUILD_DIR
}
/bin/ollama_llama_server
compress
compress
fi
;;
;;
*
)
*
)
echo
"GOARCH must be set"
echo
"GOARCH must be set"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment