Skip to content
Closed
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ option(LLAMA_BUILD_COMMON "llama: build common utils library" ${LLAMA_STANDALONE
# extra artifacts
option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
option(LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE})
option(LLAMA_DEEPSEEK_V41_NATIVE_CONTAINMENT_TESTS "llama: run native Linux DeepSeek V4.1 containment tests" OFF)
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
option(LLAMA_BUILD_APP "llama: build the unified binary" ${LLAMA_STANDALONE})
Expand Down
34 changes: 31 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
llama_build_and_test(test-deepseek41-expert.cpp)
llama_build_and_test(test-expert-store.cpp)
llama_build_and_test(test-deepseek41-memory.cpp)
# test-deepseek41-runtime.cpp needs tools/deepseek-v41-trace/trace-components.h
# to validate the trace tensor naming contract; that header lands with the
# trace harness, so its registration here is deferred to that layer.
llama_build_and_test(test-deepseek41-runtime.cpp)
llama_build_and_test(test-engram.cpp)
llama_build_and_test(test-server-child-protocol.cpp)
target_include_directories(test-server-child-protocol PRIVATE ${PROJECT_SOURCE_DIR}/tools/server)
llama_build(test-llama-archs.cpp)
llama_test(
test-llama-archs
Expand All @@ -215,6 +215,34 @@ if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
ARGS -a deepseek41 -s 1
)

find_package(Python3 COMPONENTS Interpreter)
if (Python3_Interpreter_FOUND)
llama_test_cmd(
${Python3_EXECUTABLE}
NAME test-deepseek41-trace
LABEL main
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/test-deepseek41-trace.py
)
if(BUILD_SHARED_LIBS AND LLAMA_BUILD_TOOLS AND NOT EMSCRIPTEN)
set_property(
TEST test-deepseek41-trace
APPEND PROPERTY ENVIRONMENT
"DSV41_NATIVE_TRACE_BINARY=$<TARGET_FILE:llama-deepseek-v41-trace>"
"DSV41_NATIVE_MANIFEST_BINARY=$<TARGET_FILE:test-deepseek41-trace-manifest>"
"DSV41_NATIVE_INJECT_LIBRARY=$<TARGET_FILE:test-deepseek41-trace-injected>")
if(LLAMA_DEEPSEEK_V41_NATIVE_CONTAINMENT_TESTS)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(FATAL_ERROR "Native DeepSeek V4.1 containment tests require Linux")
endif()
set_property(
TEST test-deepseek41-trace
APPEND PROPERTY ENVIRONMENT
"DSV41_NATIVE_CONTAINMENT_HELPER=$<TARGET_FILE:llama-deepseek-v41-containment-helper>")
endif()
endif()
endif()

set(MODEL_DIR "${CMAKE_CURRENT_BINARY_DIR}/test-models/")
file(MAKE_DIRECTORY "${MODEL_DIR}")

Expand Down
Loading
Loading