forked from ggerganov/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild-run-x86.sh
executable file
·62 lines (50 loc) · 916 Bytes
/
build-run-x86.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright (c) 2024- KanTV Authors
#!/bin/bash
set -e
PWD=`pwd`
LLAMA_CLI=llama-cli
function show_pwd()
{
echo -e "current working path:$(pwd)\n"
}
function build_x86
{
cmake -H. -B./out/x86 -DBUILD_SHARED_LIBS=OFF -DGGML_BACKEND_DL=OFF
cd out/x86
make -j16
ls -lah bin/${LLAMA_CLI}
/bin/cp -fv bin/${LLAMA_CLI} ../../${LLAMA_CLI}-x86
cd -
}
function remove_temp_dir()
{
if [ -d out ]; then
echo "remove out directory in `pwd`"
rm -rf out
fi
}
function show_usage()
{
echo "Usage:"
echo " $0 build"
echo -e "\n\n\n"
}
show_pwd
if [ $# == 0 ]; then
show_usage
exit 1
elif [ $# == 1 ]; then
if [ "$1" == "-h" ]; then
show_usage
exit 1
elif [ "$1" == "help" ]; then
show_usage
exit 1
elif [ "$1" == "build" ]; then
build_x86
exit 0
fi
else
show_usage
exit 1
fi