diff --git a/CMakeLists.txt b/CMakeLists.txt index 77676925f6e28..8022686863ebf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,7 +157,7 @@ if (LLAMA_HIPBLAS) if (${hipblas_FOUND} AND ${hip_FOUND}) message(STATUS "HIP and hipBLAS found") - file(GLOB GGML_SOURCES_CUDA "ggml-cuda/*.cu") + file(GLOB GGML_SOURCES_CUDA "ggml-cuda/*.cu" "ggml-cuda/*.cuh" "*.h") list(APPEND GGML_SOURCES_CUDA "ggml-cuda.cu") add_compile_definitions(GGML_USE_HIPBLAS GGML_USE_CUDA SD_USE_CUBLAS) add_library(ggml-rocm OBJECT ${GGML_SOURCES_CUDA}) @@ -169,7 +169,7 @@ if (LLAMA_HIPBLAS) target_compile_definitions(ggml-rocm PUBLIC K_QUANTS_PER_ITERATION=${LLAMA_CUDA_KQUANTS_ITER}) set_source_files_properties(${GGML_SOURCES_CUDA} PROPERTIES LANGUAGE CXX) target_link_libraries(ggml-rocm PUBLIC hip::device hip::host roc::rocblas roc::hipblas) - + target_link_libraries(ggml-rocm PRIVATE ggml) add_library(ggml-v2-rocm OBJECT ${GGML_V2_CUDA_SOURCES}) if (LLAMA_CUDA_FORCE_DMMV) @@ -480,6 +480,6 @@ if (LLAMA_HIPBLAS) set_target_properties(${TARGET} PROPERTIES PREFIX "") set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME "koboldcpp_hipblas") set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) - target_link_libraries(${TARGET} PUBLIC Threads::Threads ggml ggml_v1 ggml_v2 ggml_v3 common2 gpttype_adapter sdtype_adapter ${LLAMA_EXTRA_LIBS}) + target_link_libraries(${TARGET} PRIVATE Threads::Threads ggml ggml_v1 ggml_v2 ggml_v3 common2 gpttype_adapter sdtype_adapter ${LLAMA_EXTRA_LIBS}) target_compile_features(${TARGET} PRIVATE cxx_std_11) endif()