File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1578,6 +1578,20 @@ list(APPEND GGML_CORE_SOURCES ggml-backend.cpp)
15781578# Optionally include IQK headers for IDE visibility (no effect on linking).
15791579list (APPEND GGML_CORE_SOURCES ${GGML_HEADERS_IQK} ${GGML_HEADERS_IQK_MM} )
15801580
1581+ # --- IMPORTANT: ensure ggml-impl implementation is compiled into ggml-base ---
1582+ # ggml-impl.h contains tables/utility implementations (e.g. ggml_table_f32_f16).
1583+ # Add any matching implementation file to the core sources if present.
1584+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR } /ggml-impl.c" )
1585+ list (APPEND GGML_CORE_SOURCES ggml-impl.c)
1586+ endif ()
1587+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR } /ggml-impl.cpp" )
1588+ list (APPEND GGML_CORE_SOURCES ggml-impl.cpp)
1589+ endif ()
1590+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR } /ggml-impl.cc" )
1591+ list (APPEND GGML_CORE_SOURCES ggml-impl.cc)
1592+ endif ()
1593+ # -------------------------------------------------------------------------
1594+
15811595add_library (ggml-base SHARED ${GGML_CORE_SOURCES} )
15821596
15831597# Set versioning like mainline if variables are defined
You can’t perform that action at this time.
0 commit comments