-
Notifications
You must be signed in to change notification settings - Fork 1
/
icpp.toml
64 lines (62 loc) · 2.31 KB
/
icpp.toml
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
63
64
[build-wasm]
canister = "llama_cpp"
did_path = "src/llama_cpp.did"
cpp_paths = [
"src/llama_cpp_onicai_fork/src/llama.cpp",
"src/llama_cpp_onicai_fork/src/llama-vocab.cpp",
"src/llama_cpp_onicai_fork/src/llama-grammar.cpp",
"src/llama_cpp_onicai_fork/src/llama-sampling.cpp",
"src/llama_cpp_onicai_fork/src/unicode-data.cpp",
"src/llama_cpp_onicai_fork/src/unicode.cpp",
"src/llama_cpp_onicai_fork/common/json-schema-to-grammar.cpp",
"src/llama_cpp_onicai_fork/common/build-info.cpp",
"src/llama_cpp_onicai_fork/common/grammar-parser.cpp",
"src/llama_cpp_onicai_fork/common/sampling.cpp",
"src/llama_cpp_onicai_fork/common/common.cpp",
"src/*.cpp",
]
cpp_include_dirs = [
"src/llama_cpp_onicai_fork",
"src/llama_cpp_onicai_fork/include",
"src/llama_cpp_onicai_fork/src",
"src/llama_cpp_onicai_fork/ggml/include",
"src/llama_cpp_onicai_fork/common",
]
# NOTE: Adding compile flag "-msimd128" might be too much. It will compile everything with simd
# Alternative is to add it at granular level in the code, like:
# // Function with SIMD128 enabled
# void __attribute__((target("simd128"))) simd_function() {
# // SIMD-specific code here
# }
cpp_compile_flags = ["-DNDEBUG"]
cpp_link_flags = []
c_paths = [
"src/llama_cpp_onicai_fork/ggml/src/ggml.c",
"src/llama_cpp_onicai_fork/ggml/src/ggml-alloc.c",
"src/llama_cpp_onicai_fork/ggml/src/ggml-backend.c",
"src/llama_cpp_onicai_fork/ggml/src/ggml-quants.c",
"src/llama_cpp_onicai_fork/ggml/src/ggml-aarch64.c",
]
c_include_dirs = [
"src/llama_cpp_onicai_fork",
"src/llama_cpp_onicai_fork/include",
"src/llama_cpp_onicai_fork/ggml/src",
"src/llama_cpp_onicai_fork/ggml/include",
"src/llama_cpp_onicai_fork/common",
]
c_compile_flags = ["-DNDEBUG", "-msimd128"]
post_wasm_function = "scripts.optimize_wasm.main"
[build-native]
cpp_paths = [
# Use this to build native debug executable for testing canister code
"native/*.cpp",
# Use this to build the original console app of llama.cpp, without canister wrapper
# "src/llama_cpp_onicai_fork/examples/main/main.cpp",
# "src/llama_cpp_onicai_fork/common/console.cpp",
]
cpp_include_dirs = []
cpp_compile_flags = ["-DNDEBUG"]
cpp_link_flags = []
c_paths = []
c_include_dirs = []
c_compile_flags = ["-DNDEBUG"]