Skip to content

Commit 73ad20c

Browse files
committed
wip
1 parent 4b3a921 commit 73ad20c

File tree

140 files changed

+5327
-5235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+5327
-5235
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "kompute"]
2-
path = ggml/src/kompute
2+
path = ggml/src/ggml-kompute/kompute
33
url = https://github.com/nomic-ai/kompute.git

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
cmake_minimum_required(VERSION 3.14) # for add_link_options and implicit target directories.
1+
#cmake_minimum_required(VERSION 3.14) # for add_link_options and implicit target directories.
2+
cmake_minimum_required(VERSION 3.21)
23
project("llama.cpp" C CXX)
34
include(CheckIncludeFileCXX)
45

@@ -140,7 +141,6 @@ set(LLAMA_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Location o
140141
set(LLAMA_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Location of library files")
141142
set(LLAMA_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Location of binary files")
142143

143-
144144
# At the moment some compile definitions are placed within the ggml/src
145145
# directory but not exported on the `ggml` target. This could be improved by
146146
# determining _precisely_ which defines are necessary for the llama-config

common/common.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,7 @@ void yaml_dump_non_result_info(FILE * stream, const common_params & params, cons
19581958

19591959
const auto & sparams = params.sparams;
19601960

1961+
// FIXME
19611962
fprintf(stream, "build_commit: %s\n", LLAMA_COMMIT);
19621963
fprintf(stream, "build_number: %d\n", LLAMA_BUILD_NUMBER);
19631964
fprintf(stream, "cpu_has_arm_fma: %s\n", ggml_cpu_has_arm_fma() ? "true" : "false");
@@ -1967,18 +1968,13 @@ void yaml_dump_non_result_info(FILE * stream, const common_params & params, cons
19671968
fprintf(stream, "cpu_has_avx512: %s\n", ggml_cpu_has_avx512() ? "true" : "false");
19681969
fprintf(stream, "cpu_has_avx512_vbmi: %s\n", ggml_cpu_has_avx512_vbmi() ? "true" : "false");
19691970
fprintf(stream, "cpu_has_avx512_vnni: %s\n", ggml_cpu_has_avx512_vnni() ? "true" : "false");
1970-
fprintf(stream, "cpu_has_cuda: %s\n", ggml_cpu_has_cuda() ? "true" : "false");
1971-
fprintf(stream, "cpu_has_vulkan: %s\n", ggml_cpu_has_vulkan() ? "true" : "false");
1972-
fprintf(stream, "cpu_has_kompute: %s\n", ggml_cpu_has_kompute() ? "true" : "false");
19731971
fprintf(stream, "cpu_has_fma: %s\n", ggml_cpu_has_fma() ? "true" : "false");
1974-
fprintf(stream, "cpu_has_gpublas: %s\n", ggml_cpu_has_gpublas() ? "true" : "false");
19751972
fprintf(stream, "cpu_has_neon: %s\n", ggml_cpu_has_neon() ? "true" : "false");
19761973
fprintf(stream, "cpu_has_sve: %s\n", ggml_cpu_has_sve() ? "true" : "false");
19771974
fprintf(stream, "cpu_has_f16c: %s\n", ggml_cpu_has_f16c() ? "true" : "false");
19781975
fprintf(stream, "cpu_has_fp16_va: %s\n", ggml_cpu_has_fp16_va() ? "true" : "false");
19791976
fprintf(stream, "cpu_has_riscv_v: %s\n", ggml_cpu_has_riscv_v() ? "true" : "false");
19801977
fprintf(stream, "cpu_has_wasm_simd: %s\n", ggml_cpu_has_wasm_simd() ? "true" : "false");
1981-
fprintf(stream, "cpu_has_blas: %s\n", ggml_cpu_has_blas() ? "true" : "false");
19821978
fprintf(stream, "cpu_has_sse3: %s\n", ggml_cpu_has_sse3() ? "true" : "false");
19831979
fprintf(stream, "cpu_has_vsx: %s\n", ggml_cpu_has_vsx() ? "true" : "false");
19841980
fprintf(stream, "cpu_has_matmul_int8: %s\n", ggml_cpu_has_matmul_int8() ? "true" : "false");

ggml/include/ggml-cpu.h

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,35 @@ extern "C" {
9797
GGML_API enum ggml_status ggml_graph_compute_with_ctx(struct ggml_context * ctx, struct ggml_cgraph * cgraph, int n_threads);
9898

9999
// TODO: move to backend interface
100+
//
101+
// system info
102+
//
103+
104+
// x86
105+
GGML_API int ggml_cpu_has_sse3 (void);
106+
GGML_API int ggml_cpu_has_ssse3 (void);
107+
GGML_API int ggml_cpu_has_avx (void);
108+
GGML_API int ggml_cpu_has_avx2 (void);
109+
GGML_API int ggml_cpu_has_f16c (void);
110+
GGML_API int ggml_cpu_has_fma (void);
111+
GGML_API int ggml_cpu_has_avx_vnni (void);
112+
GGML_API int ggml_cpu_has_avx512 (void);
113+
GGML_API int ggml_cpu_has_avx512_vbmi(void);
114+
GGML_API int ggml_cpu_has_avx512_vnni(void);
115+
GGML_API int ggml_cpu_has_avx512_bf16(void);
116+
GGML_API int ggml_cpu_has_amx_int8 (void);
117+
// ARM
100118
GGML_API int ggml_cpu_has_neon (void);
101-
GGML_API int ggml_cpu_has_sve (void);
119+
GGML_API int ggml_cpu_has_arm_fma (void);
120+
GGML_API int ggml_cpu_has_fp16_va (void);
102121
GGML_API int ggml_cpu_has_matmul_int8(void);
103-
// get the sve vector length in bytes
104-
GGML_API int ggml_cpu_get_sve_cnt(void);
122+
GGML_API int ggml_cpu_has_sve (void);
123+
GGML_API int ggml_cpu_get_sve_cnt (void); // sve vector length in bytes
124+
// other
125+
GGML_API int ggml_cpu_has_riscv_v (void);
126+
GGML_API int ggml_cpu_has_vsx (void);
127+
GGML_API int ggml_cpu_has_wasm_simd (void);
128+
GGML_API int ggml_cpu_has_llamafile (void);
105129

106130
// Internal types and functions exposed for tests and benchmarks
107131

ggml/include/ggml.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,38 +2384,6 @@ extern "C" {
23842384
GGML_API size_t gguf_get_meta_size(const struct gguf_context * ctx);
23852385
GGML_API void gguf_get_meta_data(const struct gguf_context * ctx, void * data);
23862386

2387-
//
2388-
// system info
2389-
//
2390-
2391-
GGML_API int ggml_cpu_has_avx (void);
2392-
GGML_API int ggml_cpu_has_avx_vnni (void);
2393-
GGML_API int ggml_cpu_has_avx2 (void);
2394-
GGML_API int ggml_cpu_has_avx512 (void);
2395-
GGML_API int ggml_cpu_has_avx512_vbmi(void);
2396-
GGML_API int ggml_cpu_has_avx512_vnni(void);
2397-
GGML_API int ggml_cpu_has_avx512_bf16(void);
2398-
GGML_API int ggml_cpu_has_amx_int8 (void);
2399-
GGML_API int ggml_cpu_has_fma (void);
2400-
GGML_API int ggml_cpu_has_arm_fma (void);
2401-
GGML_API int ggml_cpu_has_metal (void);
2402-
GGML_API int ggml_cpu_has_f16c (void);
2403-
GGML_API int ggml_cpu_has_fp16_va (void);
2404-
GGML_API int ggml_cpu_has_wasm_simd (void);
2405-
GGML_API int ggml_cpu_has_blas (void);
2406-
GGML_API int ggml_cpu_has_cuda (void);
2407-
GGML_API int ggml_cpu_has_vulkan (void);
2408-
GGML_API int ggml_cpu_has_kompute (void);
2409-
GGML_API int ggml_cpu_has_gpublas (void);
2410-
GGML_API int ggml_cpu_has_sse3 (void);
2411-
GGML_API int ggml_cpu_has_ssse3 (void);
2412-
GGML_API int ggml_cpu_has_riscv_v (void);
2413-
GGML_API int ggml_cpu_has_sycl (void);
2414-
GGML_API int ggml_cpu_has_rpc (void);
2415-
GGML_API int ggml_cpu_has_vsx (void);
2416-
GGML_API int ggml_cpu_has_cann (void);
2417-
GGML_API int ggml_cpu_has_llamafile (void);
2418-
24192387
#ifdef __cplusplus
24202388
// restrict not standard in C++
24212389
#define GGML_RESTRICT

0 commit comments

Comments
 (0)