File tree Expand file tree Collapse file tree 4 files changed +762
-745
lines changed Expand file tree Collapse file tree 4 files changed +762
-745
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
2828 ggml-cpu/repack.h
2929 ggml-cpu/hbm.cpp
3030 ggml-cpu/hbm.h
31- ggml-cpu/quants.c
3231 ggml-cpu/quants.h
3332 ggml-cpu/traits.cpp
3433 ggml-cpu/traits.h
@@ -453,6 +452,12 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
453452 list (APPEND ARCH_FLAGS -DGGML_CPU_GENERIC)
454453 endif ()
455454
455+ # Include generic implementations last to avoid accidentally overriding arch-specific implementations in static linking
456+ list (APPEND GGML_CPU_SOURCES
457+ ggml-cpu/repack-impl.cpp
458+ ggml-cpu/quants.c
459+ )
460+
456461 if (GGML_CPU_REPACK)
457462 target_compile_definitions (${GGML_CPU_NAME} PRIVATE GGML_USE_CPU_REPACK)
458463 endif ()
You can’t perform that action at this time.
0 commit comments