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
b438d485
Commit
b438d485
authored
Apr 26, 2024
by
Hernan Martinez
Browse files
Use architecture specific folders in the generate script
parent
204349b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
llm/generate/gen_windows.ps1
llm/generate/gen_windows.ps1
+6
-2
No files found.
llm/generate/gen_windows.ps1
View file @
b438d485
...
...
@@ -42,7 +42,7 @@ function init_vars {
"-DLLAMA_NATIVE=off"
)
$
script
:
commonCpuDefs
=
@(
"-DCMAKE_POSITION_INDEPENDENT_CODE=on"
)
$
script
:
ARCH
=
"amd64"
# arm not yet supported.
$
script
:
ARCH
=
$
Env
:
PROCESSOR_ARCHITECTURE
.
ToLower
()
$
script
:
DIST_BASE
=
"
${script:SRC_DIR}
\dist\windows-
${script:ARCH}
\ollama_runners"
md
"
$
script
:
DIST_BASE
"
-ea
0
>
$null
if
(
$
env
:
CGO_CFLAGS
-contains
"-g"
)
{
...
...
@@ -217,7 +217,11 @@ function build_cpu() {
if ((-not "
${env:OLLAMA_SKIP_CPU_GENERATE}
" ) -and ((-not "
${env:OLLAMA_CPU_TARGET}
") -or ("
${env:OLLAMA_CPU_TARGET}
" -eq "
cpu
"))) {
# remaining llama.cpp builds use MSVC
init_vars
$
script
:
cmakeDefs
=
$
script
:
commonCpuDefs
+ @("
-A
", "
x64
", "
-DLLAMA_AVX
=
off
", "
-DLLAMA_AVX2
=
off
", "
-DLLAMA_AVX512
=
off
", "
-DLLAMA_FMA
=
off
", "
-DLLAMA_F16C
=
off
") +
$
script
:
cmakeDefs
$gen_arch
= "
x64
"
if (
$
scrip
:
ARCH
-eq "
arm64
") {
$gen_arch
= "
ARM64
"
}
$
script
:
cmakeDefs
=
$
script
:
commonCpuDefs
+ @("
-A
",
$gen_arch
, "
-DLLAMA_AVX
=
off
", "
-DLLAMA_AVX2
=
off
", "
-DLLAMA_AVX512
=
off
", "
-DLLAMA_FMA
=
off
", "
-DLLAMA_F16C
=
off
") +
$
script
:
cmakeDefs
$
script
:
buildDir
="
..
/build/windows/
${script:ARCH}
/cpu
"
$
script
:
distDir
="
$
script
:
DIST_BASE
\cpu
"
write-host "
Building
LCD
CPU
"
...
...
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