]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
hexagon: add llama-completion runner script (#20095)
authorTodor Boinovski <redacted>
Wed, 4 Mar 2026 23:04:59 +0000 (15:04 -0800)
committerGitHub <redacted>
Wed, 4 Mar 2026 23:04:59 +0000 (15:04 -0800)
scripts/snapdragon/windows/run-cli.ps1
scripts/snapdragon/windows/run-completion.ps1 [new file with mode: 0644]

index 40c7acc430fc20e66c244c92ad2d27e31e40688b..5891c894a9f61b77dca0b88edfce62e61c38a0e4 100644 (file)
@@ -46,8 +46,8 @@ if ($null -ne $env:NDEV) {
 
 $env:ADSP_LIBRARY_PATH="$basedir\lib"
 
-& "$basedir\bin\llama-completion.exe" `
-    --no-mmap -no-cnv -m $basedir\..\..\gguf\$model `
+& "$basedir\bin\llama-cli.exe" `
+    --no-mmap -m $basedir\..\..\gguf\$model `
     --poll 1000 -t 6 --cpu-mask 0xfc --cpu-strict 1 `
     --ctx-size 8192 --ubatch-size 128 -fa on `
     -ngl 99 --device $device $cli_opts
diff --git a/scripts/snapdragon/windows/run-completion.ps1 b/scripts/snapdragon/windows/run-completion.ps1
new file mode 100644 (file)
index 0000000..8a48d2d
--- /dev/null
@@ -0,0 +1,53 @@
+
+#!/usr/bin/env pwsh
+
+# Basedir on device
+$basedir=".\pkg-snapdragon"
+
+$cli_opts=$args
+
+$model="Llama-3.2-3B-Instruct-Q4_0.gguf"
+if ($null -ne $env:M) {
+    $model=$env:M
+}
+
+$device="HTP0"
+if ($null -ne $env:D) {
+    $device=$env:D
+}
+
+if ($null -ne $env:V) {
+    $env:GGML_HEXAGON_VERBOSE=$env:V
+}
+
+if ($null -ne $env:E) {
+    $env:GGML_HEXAGON_EXPERIMENTAL=$env:E
+}
+
+if ($null -ne $env:SCHED) {
+    $env:GGML_SCHED_DEBUG=$env:SCHED; $cli_opts="$cli_opts -v"
+}
+
+if ($null -ne $env:PROF) {
+    $env:GGML_HEXAGON_PROFILE=$env:PROF; $env:GGML_HEXAGON_OPSYNC=1
+}
+
+if ($null -ne $env:OPMASK) {
+    $env:GGML_HEXAGON_OPMASK=$env:OPMASK
+}
+
+if ($null -ne $env:NHVX) {
+    $env:GGML_HEXAGON_NHVX=$env:NHVX
+}
+
+if ($null -ne $env:NDEV) {
+    $env:GGML_HEXAGON_NDEV=$env:NDEV
+}
+
+$env:ADSP_LIBRARY_PATH="$basedir\lib"
+
+& "$basedir\bin\llama-completion.exe" `
+    --no-mmap -m $basedir\..\..\gguf\$model `
+    --poll 1000 -t 6 --cpu-mask 0xfc --cpu-strict 1 `
+    --ctx-size 8192 --batch-size 128 -fa on `
+    -ngl 99 -no-cnv --device $device $cli_opts