File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -773,21 +773,20 @@ if(DFLASH27B_TESTS)
773773 src/server/http_server.cpp
774774 src/server/model_card.cpp )
775775 target_include_directories (test_server_unit PRIVATE ${DFLASH27B_SRC_INCLUDE_DIRS} )
776- target_include_directories (test_server_unit PRIVATE
777- ${CMAKE_CURRENT_SOURCE_DIR } /deps/llama.cpp/ggml/src
778- ${CMAKE_CURRENT_SOURCE_DIR } /deps/llama.cpp/common )
779776 if (DFLASH27B_GPU_BACKEND STREQUAL "hip" )
780777 target_compile_definitions (test_server_unit PRIVATE DFLASH27B_BACKEND_HIP=1 GGML_USE_HIP )
781778 else ()
782779 target_compile_definitions (test_server_unit PRIVATE
783780 DFLASH27B_BACKEND_CUDA=1
784781 DFLASH27B_CUDA_MIN_SM=${_dflash_cuda_min_sm} )
785782 endif ()
786- target_link_libraries (test_server_unit PRIVATE
787- ggml-base
788- ggml-cpu
789- nlohmann_json::nlohmann_json
790- pthread )
783+ target_link_libraries (test_server_unit PRIVATE dflash_common ggml ${DFLASH27B_GGML_BACKEND_TARGET} )
784+ if (DFLASH27B_GPU_BACKEND STREQUAL "cuda" )
785+ find_package (CUDAToolkit REQUIRED )
786+ target_link_libraries (test_server_unit PRIVATE CUDA::cudart )
787+ else ()
788+ target_link_libraries (test_server_unit PRIVATE hip::host )
789+ endif ()
791790 add_test (NAME server_unit COMMAND test_server_unit )
792791 endif ()
793792
You can’t perform that action at this time.
0 commit comments