mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-26 11:45:21 +00:00
llama : allow building all tests on windows when not using shared libs (#13980)
* llama : allow building all tests on windows when not using shared libraries * add static windows build to ci * tests : enable debug logs for test-chat --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -687,8 +687,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- build: 'cpu-x64'
|
- build: 'cpu-x64 (static)'
|
||||||
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF'
|
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF'
|
||||||
- build: 'openblas-x64'
|
- build: 'openblas-x64'
|
||||||
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
|
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
|
||||||
- build: 'vulkan-x64'
|
- build: 'vulkan-x64'
|
||||||
|
@ -104,8 +104,8 @@ if (LLAMA_LLGUIDANCE)
|
|||||||
llama_build_and_test(test-grammar-llguidance.cpp ARGS ${CMAKE_CURRENT_SOURCE_DIR}/../models/ggml-vocab-llama-bpe.gguf)
|
llama_build_and_test(test-grammar-llguidance.cpp ARGS ${CMAKE_CURRENT_SOURCE_DIR}/../models/ggml-vocab-llama-bpe.gguf)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
|
||||||
# these tests are disabled on Windows because they use internal functions not exported with LLAMA_API
|
# these tests are disabled on Windows because they use internal functions not exported with LLAMA_API (when building with shared libraries)
|
||||||
llama_build_and_test(test-sampling.cpp)
|
llama_build_and_test(test-sampling.cpp)
|
||||||
llama_build_and_test(test-grammar-parser.cpp)
|
llama_build_and_test(test-grammar-parser.cpp)
|
||||||
llama_build_and_test(test-grammar-integration.cpp)
|
llama_build_and_test(test-grammar-integration.cpp)
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
#include "chat.h"
|
#include "chat.h"
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#include "../src/unicode.h"
|
#include "../src/unicode.h"
|
||||||
#include "../src/llama-grammar.h"
|
#include "../src/llama-grammar.h"
|
||||||
|
|
||||||
@ -1428,6 +1430,8 @@ static void test_msg_diffs_compute() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char ** argv) {
|
int main(int argc, char ** argv) {
|
||||||
|
common_log_set_verbosity_thold(999);
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
|
Reference in New Issue
Block a user