Skip to content

Commit 02b9c51

Browse files
committed
ggml : move AMX to the CPU backend
ggml-ci
1 parent 3ad5451 commit 02b9c51

File tree

58 files changed

+464
-753
lines changed

Some content is hidden

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

58 files changed

+464
-753
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ Checks: >
1717
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
1818
performance-*,
1919
portability-*,
20+
-portability-simd-intrinsics,
2021
misc-*,
2122
-misc-const-correctness,
2223
-misc-non-private-member-variables-in-classes,
2324
-misc-no-recursion,
25+
-misc-use-anonymous-namespace,
2426
FormatStyle: none

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ endif
254254
# keep standard at C11 and C++11
255255
MK_CPPFLAGS = -Iggml/include -Iggml/src -Iinclude -Isrc -Icommon -DGGML_USE_CPU
256256
MK_CFLAGS = -std=c11 -fPIC
257-
MK_CXXFLAGS = -std=c++11 -fPIC
258-
MK_NVCCFLAGS = -std=c++11
257+
MK_CXXFLAGS = -std=c++17 -fPIC
258+
MK_NVCCFLAGS = -std=c++17
259259

260260
ifdef LLAMA_NO_CCACHE
261261
GGML_NO_CCACHE := 1

common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ if (LLAMA_CURL)
8888
endif ()
8989

9090
target_include_directories(${TARGET} PUBLIC .)
91-
target_compile_features (${TARGET} PUBLIC cxx_std_11)
91+
target_compile_features (${TARGET} PUBLIC cxx_std_17)
9292
target_link_libraries (${TARGET} PRIVATE ${LLAMA_COMMON_EXTRA_LIBS} PUBLIC llama Threads::Threads)

examples/batched-bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-batched-bench)
22
add_executable(${TARGET} batched-bench.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/batched/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-batched)
22
add_executable(${TARGET} batched.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/convert-llama2c-to-ggml/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-convert-llama2c-to-ggml)
22
add_executable(${TARGET} convert-llama2c-to-ggml.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/cvector-generator/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-cvector-generator)
22
add_executable(${TARGET} cvector-generator.cpp pca.hpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/embedding/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-embedding)
22
add_executable(${TARGET} embedding.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/eval-callback/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set(TARGET llama-eval-callback)
22
add_executable(${TARGET} eval-callback.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)
66

77
set(TEST_TARGET test-eval-callback)
88
add_test(NAME ${TEST_TARGET}

examples/export-lora/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-export-lora)
22
add_executable(${TARGET} export-lora.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/gbnf-validator/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-gbnf-validator)
22
add_executable(${TARGET} gbnf-validator.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/gen-docs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-gen-docs)
22
add_executable(${TARGET} gen-docs.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/gguf-hash/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ add_library(sha256 OBJECT deps/sha256/sha256.c deps/sha256/sha256.h)
1919
target_link_libraries(${TARGET} PRIVATE sha256)
2020

2121
target_link_libraries(${TARGET} PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT})
22-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
22+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/gguf-split/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-gguf-split)
22
add_executable(${TARGET} gguf-split.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/gguf/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-gguf)
22
add_executable(${TARGET} gguf.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/gritlm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-gritlm)
22
add_executable(${TARGET} gritlm.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/imatrix/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-imatrix)
22
add_executable(${TARGET} imatrix.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/infill/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-infill)
22
add_executable(${TARGET} infill.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/llama-bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-bench)
22
add_executable(${TARGET} llama-bench.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/llava/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ target_include_directories(llava PUBLIC .)
1111
target_include_directories(llava PUBLIC ../..)
1212
target_include_directories(llava PUBLIC ../../common)
1313

14-
target_compile_features(llava PRIVATE cxx_std_11)
14+
target_compile_features(llava PRIVATE cxx_std_17)
1515

1616
add_library(llava_static STATIC $<TARGET_OBJECTS:llava>)
1717
if (BUILD_SHARED_LIBS)
@@ -35,11 +35,11 @@ add_executable(${TARGET} llava-cli.cpp)
3535
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME llama-llava-cli)
3636
install(TARGETS ${TARGET} RUNTIME)
3737
target_link_libraries(${TARGET} PRIVATE common llava ${CMAKE_THREAD_LIBS_INIT})
38-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
38+
target_compile_features(${TARGET} PRIVATE cxx_std_17)
3939

4040
set(TARGET llama-minicpmv-cli)
4141
add_executable(${TARGET} minicpmv-cli.cpp)
4242
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME llama-minicpmv-cli)
4343
install(TARGETS ${TARGET} RUNTIME)
4444
target_link_libraries(${TARGET} PRIVATE common llava ${CMAKE_THREAD_LIBS_INIT})
45-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
45+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/lookahead/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-lookahead)
22
add_executable(${TARGET} lookahead.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/lookup/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ set(TARGET llama-lookup)
22
add_executable(${TARGET} lookup.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)
66

77
set(TARGET llama-lookup-create)
88
add_executable(${TARGET} lookup-create.cpp)
99
install(TARGETS ${TARGET} RUNTIME)
1010
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
11-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
11+
target_compile_features(${TARGET} PRIVATE cxx_std_17)
1212

1313
set(TARGET llama-lookup-merge)
1414
add_executable(${TARGET} lookup-merge.cpp)
1515
install(TARGETS ${TARGET} RUNTIME)
1616
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
17-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
17+
target_compile_features(${TARGET} PRIVATE cxx_std_17)
1818

1919
set(TARGET llama-lookup-stats)
2020
add_executable(${TARGET} lookup-stats.cpp)
2121
install(TARGETS ${TARGET} RUNTIME)
2222
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
23-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
23+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/main-cmake-pkg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ add_executable(${TARGET} ${CMAKE_CURRENT_LIST_DIR}/../main/main.cpp)
2929
target_include_directories(${TARGET} PRIVATE ${_common_path})
3030
install(TARGETS ${TARGET} RUNTIME)
3131
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
32-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
32+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/main/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-cli)
22
add_executable(${TARGET} main.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/parallel/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-parallel)
22
add_executable(${TARGET} parallel.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/passkey/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-passkey)
22
add_executable(${TARGET} passkey.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/perplexity/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-perplexity)
22
add_executable(${TARGET} perplexity.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/quantize-stats/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ add_executable(${TARGET} quantize-stats.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE llama build_info ${CMAKE_THREAD_LIBS_INIT})
55
target_include_directories(${TARGET} PRIVATE ../../common)
6-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
6+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/quantize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ add_executable(${TARGET} quantize.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_include_directories(${TARGET} PRIVATE ../../common)
6-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
6+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/retrieval/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-retrieval)
22
add_executable(${TARGET} retrieval.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/run/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-run)
22
add_executable(${TARGET} run.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/save-load-state/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-save-load-state)
22
add_executable(${TARGET} save-load-state.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/server/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ if (WIN32)
5050
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32)
5151
endif()
5252

53-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
53+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/simple-chat/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-simple-chat)
22
add_executable(${TARGET} simple-chat.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-simple)
22
add_executable(${TARGET} simple.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/speculative-simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-speculative-simple)
22
add_executable(${TARGET} speculative-simple.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/speculative/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-speculative)
22
add_executable(${TARGET} speculative.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

examples/tokenize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ set(TARGET llama-tokenize)
22
add_executable(${TARGET} tokenize.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
5-
target_compile_features(${TARGET} PRIVATE cxx_std_11)
5+
target_compile_features(${TARGET} PRIVATE cxx_std_17)

ggml/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ set (GGML_METAL_MACOSX_VERSION_MIN "" CACHE STRING
161161
set (GGML_METAL_STD "" CACHE STRING "ggml: metal standard version (-std flag)")
162162
option(GGML_OPENMP "ggml: use OpenMP" ON)
163163
option(GGML_RPC "ggml: use RPC" OFF)
164-
option(GGML_AMX "ggml: use AMX" OFF)
165164
option(GGML_SYCL "ggml: use SYCL" OFF)
166165
option(GGML_SYCL_F16 "ggml: use 16 bit floats for sycl calculations" OFF)
167166
set (GGML_SYCL_TARGET "INTEL" CACHE STRING

ggml/include/ggml-amx.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

ggml/src/CMakeLists.txt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,15 @@ function(ggml_add_backend backend)
261261
if (${backend_id})
262262
string(TOLOWER "ggml-${backend}" backend_target)
263263
add_subdirectory(${backend_target})
264-
# check again in case the backend disabled itself
265-
# note that this should NOT be the normal behavior, in case of errors the backend should fail the build
266-
# however, currently it is necessary for AMX, since it is enabled by default on llama.cpp
267-
if (${backend_id})
268-
message(STATUS "Including ${backend} backend")
269-
if (NOT GGML_BACKEND_DL)
270-
string(TOUPPER "GGML_USE_${backend}" backend_use)
271-
target_compile_definitions(ggml PUBLIC ${backend_use})
272-
endif()
264+
message(STATUS "Including ${backend} backend")
265+
if (NOT GGML_BACKEND_DL)
266+
string(TOUPPER "GGML_USE_${backend}" backend_use)
267+
target_compile_definitions(ggml PUBLIC ${backend_use})
273268
endif()
274269
endif()
275270
endfunction()
276271

277272
ggml_add_backend(CPU)
278-
ggml_add_backend(AMX)
279273
ggml_add_backend(BLAS)
280274
ggml_add_backend(CANN)
281275
ggml_add_backend(CUDA)
@@ -289,7 +283,7 @@ ggml_add_backend(Vulkan)
289283

290284
foreach (target ggml-base ggml)
291285
target_include_directories(${target} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> $<INSTALL_INTERFACE:include>)
292-
target_compile_features (${target} PRIVATE c_std_11) # don't bump
286+
target_compile_features (${target} PRIVATE c_std_11 cxx_std_17) # don't bump
293287
endforeach()
294288

295289
target_link_libraries(ggml-base PRIVATE Threads::Threads)

0 commit comments

Comments
 (0)