Skip to content

Commit 380dcd7

Browse files
committed
Fix missing ggml/src/ggml-impl.h
1 parent c2662da commit 380dcd7

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

ggml/src/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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).
15791579
list(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+
15811595
add_library(ggml-base SHARED ${GGML_CORE_SOURCES})
15821596

15831597
# Set versioning like mainline if variables are defined

0 commit comments

Comments
 (0)