Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ggml/src/ggml-cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,9 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
target_sources(${GGML_CPU_NAME} PRIVATE ${GGML_CPU_SOURCES})
target_compile_options(${GGML_CPU_NAME} PRIVATE ${ARCH_FLAGS})
target_compile_definitions(${GGML_CPU_NAME} PRIVATE ${ARCH_DEFINITIONS})
#Exporting the arch flags and options to access them in tests/CMakelists.txt
set(GLOBAL_GGML_CPU_ARCH_FLAGS "${ARCH_FLAGS}" CACHE INTERNAL "Compiler flags for the default GGML CPU backend." FORCE)
set(GLOBAL_GGML_CPU_ARCH_DEFINITIONS "${ARCH_DEFINITIONS}" CACHE INTERNAL "Compiler definitions for the default GGML CPU backend." FORCE)

if (EMSCRIPTEN)
set_target_properties(${GGML_CPU_NAME} PROPERTIES COMPILE_FLAGS "-msimd128")
Expand Down
28 changes: 28 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,34 @@ if (NOT GGML_BACKEND_DL)
llama_build_and_test(test-quantize-fns.cpp)
llama_build_and_test(test-quantize-perf.cpp)
llama_build_and_test(test-rope.cpp)
llama_build_and_test(test-float-fns.cpp)
llama_build_and_test(test-float-perf.cpp)
target_include_directories(
test-float-fns PRIVATE
${CMAKE_SOURCE_DIR}/ggml/src/ggml-cpu
${CMAKE_SOURCE_DIR}/ggml/src
)
target_include_directories(
test-float-perf PRIVATE
${CMAKE_SOURCE_DIR}/ggml/src/ggml-cpu
${CMAKE_SOURCE_DIR}/ggml/src
)
target_compile_options(
test-float-perf PRIVATE
${GLOBAL_GGML_CPU_ARCH_FLAGS}
)
target_compile_definitions(
test-float-perf PRIVATE
${GLOBAL_GGML_CPU_ARCH_DEFINITIONS}
)
target_compile_options(
test-float-fns PRIVATE
${GLOBAL_GGML_CPU_ARCH_FLAGS}
)
target_compile_definitions(
test-float-fns PRIVATE
${GLOBAL_GGML_CPU_ARCH_DEFINITIONS}
)
endif()

# libmtmd
Expand Down
Loading
Loading