Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/concedo'
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowRoseCx committed Jan 20, 2025
2 parents 4f071ee + 65c5c77 commit 2b5cf34
Show file tree
Hide file tree
Showing 191 changed files with 240,669 additions and 214,445 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/kcpp-build-release-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
--add-data './kcpp_sdui.embd:.' \
--add-data './taesd.embd:.' \
--add-data './taesd_xl.embd:.' \
--add-data './taesd_f.embd:.' \
--add-data './taesd_3.embd:.' \
--add-data './rwkv_vocab.embd:.' \
--add-data './rwkv_world_vocab.embd:.' \
--version-file './version.txt' \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kcpp-build-release-osx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
make LLAMA_METAL=1 LLAMA_PORTABLE=1
chmod +x './create_ver_file.sh'
. create_ver_file.sh
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-mac-arm64"
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './taesd_f.embd:.' --add-data './taesd_3.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-mac-arm64"
- name: Test
id: test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/kcpp-build-release-win-full-cu12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
cd build
cmake .. -DLLAMA_CUBLAS=ON -DCMAKE_SYSTEM_VERSION="10.0.19041.0"
cmake --build . --config Release -j 2
mv bin/Release/koboldcpp_cublas.dll ../koboldcpp_cublas.dll
cd ..
# note: The libraries that come from the github cuda directory seem to be larger, so they are not recommended
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/kcpp-build-release-win-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
cd build
cmake .. -DLLAMA_CUBLAS=ON -DCMAKE_SYSTEM_VERSION="10.0.19041.0"
cmake --build . --config Release -j 2
mv bin/Release/koboldcpp_cublas.dll ../koboldcpp_cublas.dll
cd ..
# note: The libraries that come from the github cuda directory seem to be larger, so they are not recommended
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/kcpp-build-release-win-oldcpu-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
cd build
cmake .. -DLLAMA_CUBLAS=ON -DLLAMA_AVX2=OFF -DCMAKE_SYSTEM_VERSION="10.0.19041.0"
cmake --build . --config Release -j 2
mv bin/Release/koboldcpp_cublas.dll ../koboldcpp_cublas.dll
cd ..
# note: The libraries that come from the github cuda directory seem to be larger, so they are not recommended
Expand Down
35 changes: 31 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,8 @@ add_library(ggml
ggml/src/ggml-cpu/ggml-cpu-quants.c
ggml/src/ggml-cpu/ggml-cpu-quants.h
ggml/src/ggml-backend-reg.cpp
ggml/include/gguf.h
ggml/src/gguf.cpp
${GGML_SOURCES_CUDA})
target_include_directories(ggml PUBLIC . ./ggml/include ./ggml/src ./ggml/src/ggml-cpu ./include ./otherarch ./otherarch/tools)
target_compile_features(ggml PUBLIC c_std_11) # don't bump
Expand Down Expand Up @@ -541,7 +543,9 @@ add_library(common2
examples/llava/clip.h
src/unicode.h
src/unicode.cpp
src/unicode-data.cpp)
src/unicode-data.cpp
otherarch/utils.cpp
otherarch/utils.h)
target_include_directories(common2 PUBLIC . ./ggml/include ./ggml/src ./ggml/src/ggml-cpu ./include ./otherarch ./otherarch/tools ./otherarch/sdcpp ./otherarch/sdcpp/thirdparty ./examples ./common)
target_compile_features(common2 PUBLIC cxx_std_17) # don't bump
target_link_libraries(common2 PRIVATE ggml ${LLAMA_EXTRA_LIBS})
Expand All @@ -561,11 +565,18 @@ target_compile_features(whisper_adapter PUBLIC cxx_std_17) # don't bump
target_link_libraries(whisper_adapter PRIVATE common2 ggml ${LLAMA_EXTRA_LIBS})
set_target_properties(whisper_adapter PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(tts_adapter
otherarch/tts_adapter.cpp)
target_include_directories(tts_adapter PUBLIC . ./ggml/include ./ggml/src ./ggml/src/ggml-cpu ./include ./otherarch ./otherarch/tools ./examples ./common)
target_compile_features(tts_adapter PUBLIC cxx_std_17) # don't bump
target_link_libraries(tts_adapter PRIVATE common2 ggml ${LLAMA_EXTRA_LIBS})
set_target_properties(tts_adapter PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(gpttype_adapter
gpttype_adapter.cpp)
target_include_directories(gpttype_adapter PUBLIC . ./ggml/include ./ggml/src ./ggml/src/ggml-cpu ./include ./otherarch ./otherarch/tools ./otherarch/sdcpp ./otherarch/sdcpp/thirdparty ./examples ./common)
target_compile_features(gpttype_adapter PUBLIC cxx_std_17) # don't bump
target_link_libraries(gpttype_adapter PRIVATE common2 ggml ${LLAMA_EXTRA_LIBS})
target_link_libraries(gpttype_adapter PRIVATE common2 ggml ggml_v1 ggml_v2 ggml_v3 ${LLAMA_EXTRA_LIBS})
set_target_properties(gpttype_adapter PROPERTIES POSITION_INDEPENDENT_CODE ON)

if (LLAMA_CUBLAS)
Expand All @@ -576,8 +587,16 @@ if (LLAMA_CUBLAS)
set_target_properties(${TARGET} PROPERTIES PREFIX "")
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME "koboldcpp_cublas")
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 whisper_adapter sdtype_adapter ${LLAMA_EXTRA_LIBS})
target_link_libraries(${TARGET} PUBLIC Threads::Threads ggml ggml_v1 ggml_v2 ggml_v3 common2 gpttype_adapter whisper_adapter tts_adapter sdtype_adapter ${LLAMA_EXTRA_LIBS})
target_compile_features(${TARGET} PRIVATE cxx_std_17)

add_custom_command(
TARGET koboldcpp_cublas POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:koboldcpp_cublas> # The generated DLL
${CMAKE_SOURCE_DIR}/ # Destination directory
COMMENT "Copying DLL to parent directory"
)
endif()

if (LLAMA_HIPBLAS)
Expand All @@ -595,6 +614,14 @@ 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} PRIVATE Threads::Threads ggml ggml_v1 ggml_v2 ggml_v3 common2 gpttype_adapter whisper_adapter sdtype_adapter ${LLAMA_EXTRA_LIBS})
target_link_libraries(${TARGET} PRIVATE Threads::Threads ggml ggml_v1 ggml_v2 ggml_v3 common2 gpttype_adapter whisper_adapter tts_adapter sdtype_adapter ${LLAMA_EXTRA_LIBS})
target_compile_features(${TARGET} PRIVATE cxx_std_17)

add_custom_command(
TARGET koboldcpp_hipblas POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:koboldcpp_hipblas> # The generated DLL
${CMAKE_SOURCE_DIR}/ # Destination directory
COMMENT "Copying DLL to parent directory"
)
endif()
Loading

0 comments on commit 2b5cf34

Please sign in to comment.