Skip to content

Commit e12c475

Browse files
hexagon: update adb/run-bench.sh to properly support experimental and verbose options
1 parent f854b2c commit e12c475

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

scripts/snapdragon/adb/run-bench.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ model="Llama-3.2-3B-Instruct-Q4_0.gguf"
1616
device="HTP0"
1717
[ "$D" != "" ] && device="$D"
1818

19-
verbose=""
20-
[ "$V" != "" ] && verbose="$V"
19+
verbose=
20+
[ "$V" != "" ] && verbose="GGML_HEXAGON_VERBOSE=$V" cli_opts="$cli_opts -v"
21+
22+
experimental=
23+
[ "$E" != "" ] && experimental="GGML_HEXAGON_EXPERIMENTAL=$E"
24+
25+
profile=
26+
[ "$PROF" != "" ] && profile="GGML_HEXAGON_PROFILE=$PROF GGML_HEXAGON_OPSYNC=1" cli_opts="$cli_opts -v"
2127

2228
opmask=
2329
[ "$OPMASK" != "" ] && opmask="GGML_HEXAGON_OPMASK=$OPMASK"
@@ -34,7 +40,7 @@ adb $adbserial shell " \
3440
cd $basedir; \
3541
LD_LIBRARY_PATH=$basedir/$branch/lib \
3642
ADSP_LIBRARY_PATH=$basedir/$branch/lib \
37-
$ndev $nhvx $opmask ./$branch/bin/llama-bench --device $device --mmap 0 -m $basedir/../gguf/$model \
43+
$ndev $nhvx $opmask $verbose $experimental $profile ./$branch/bin/llama-bench --device $device --mmap 0 -m $basedir/../gguf/$model \
3844
--poll 1000 -t 6 --cpu-mask 0xfc --cpu-strict 1 \
39-
--batch-size 128 -ngl 99 $@ \
45+
--batch-size 128 -ngl 99 $cli_opts $@ \
4046
"

0 commit comments

Comments
 (0)