-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
326 changed files
with
168,986 additions
and
16,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "bindings/ios"] | ||
path = bindings/ios | ||
url = https://github.com/ggerganov/whisper.spm | ||
Large diffs are not rendered by default.
Oops, something went wrong.
Submodule ios
deleted from
a20854
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
set(BUILD_NUMBER 0) | ||
set(BUILD_COMMIT "unknown") | ||
set(BUILD_COMPILER "unknown") | ||
set(BUILD_TARGET "unknown") | ||
|
||
# Look for git | ||
find_package(Git) | ||
if(NOT Git_FOUND) | ||
find_program(GIT_EXECUTABLE NAMES git git.exe) | ||
if(GIT_EXECUTABLE) | ||
set(Git_FOUND TRUE) | ||
message(STATUS "Found Git: ${GIT_EXECUTABLE}") | ||
else() | ||
message(WARNING "Git not found. Build info will not be accurate.") | ||
endif() | ||
endif() | ||
|
||
# Get the commit count and hash | ||
if(Git_FOUND) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
OUTPUT_VARIABLE HEAD | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
RESULT_VARIABLE RES | ||
) | ||
if (RES EQUAL 0) | ||
set(BUILD_COMMIT ${HEAD}) | ||
endif() | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
OUTPUT_VARIABLE COUNT | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
RESULT_VARIABLE RES | ||
) | ||
if (RES EQUAL 0) | ||
set(BUILD_NUMBER ${COUNT}) | ||
endif() | ||
endif() | ||
|
||
if(MSVC) | ||
set(BUILD_COMPILER "${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}") | ||
set(BUILD_TARGET ${CMAKE_VS_PLATFORM_NAME}) | ||
else() | ||
execute_process( | ||
COMMAND sh -c "$@ --version | head -1" _ ${CMAKE_C_COMPILER} | ||
OUTPUT_VARIABLE OUT | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
set(BUILD_COMPILER ${OUT}) | ||
execute_process( | ||
COMMAND ${CMAKE_C_COMPILER} -dumpmachine | ||
OUTPUT_VARIABLE OUT | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
set(BUILD_TARGET ${OUT}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
set(LLAMA_VERSION @LLAMA_INSTALL_VERSION@) | ||
set(LLAMA_BUILD_COMMIT @LLAMA_BUILD_COMMIT@) | ||
set(LLAMA_BUILD_NUMBER @LLAMA_BUILD_NUMBER@) | ||
set(LLAMA_SHARED_LIB @BUILD_SHARED_LIBS@) | ||
|
||
set(GGML_BLAS @GGML_BLAS@) | ||
set(GGML_CUDA @GGML_CUDA@) | ||
set(GGML_METAL @GGML_METAL@) | ||
set(GGML_HIPBLAS @GGML_HIPBLAS@) | ||
set(GGML_ACCELERATE @GGML_ACCELERATE@) | ||
|
||
@PACKAGE_INIT@ | ||
|
||
set_and_check(LLAMA_INCLUDE_DIR "@PACKAGE_LLAMA_INCLUDE_INSTALL_DIR@") | ||
set_and_check(LLAMA_LIB_DIR "@PACKAGE_LLAMA_LIB_INSTALL_DIR@") | ||
set_and_check(LLAMA_BIN_DIR "@PACKAGE_LLAMA_BIN_INSTALL_DIR@") | ||
|
||
# Ensure transient dependencies satisfied | ||
|
||
find_package(Threads REQUIRED) | ||
|
||
if (APPLE AND GGML_ACCELERATE) | ||
find_library(ACCELERATE_FRAMEWORK Accelerate REQUIRED) | ||
endif() | ||
|
||
if (GGML_BLAS) | ||
find_package(BLAS REQUIRED) | ||
endif() | ||
|
||
if (GGML_CUDA) | ||
find_package(CUDAToolkit REQUIRED) | ||
endif() | ||
|
||
if (GGML_METAL) | ||
find_library(FOUNDATION_LIBRARY Foundation REQUIRED) | ||
find_library(METAL_FRAMEWORK Metal REQUIRED) | ||
find_library(METALKIT_FRAMEWORK MetalKit REQUIRED) | ||
endif() | ||
|
||
if (GGML_HIPBLAS) | ||
find_package(hip REQUIRED) | ||
find_package(hipblas REQUIRED) | ||
find_package(rocblas REQUIRED) | ||
endif() | ||
|
||
find_library(llama_LIBRARY llama | ||
REQUIRED | ||
HINTS ${LLAMA_LIB_DIR}) | ||
|
||
set(_llama_link_deps "Threads::Threads" "@LLAMA_EXTRA_LIBS@") | ||
set(_llama_transient_defines "@LLAMA_TRANSIENT_DEFINES@") | ||
|
||
add_library(llama UNKNOWN IMPORTED) | ||
|
||
set_target_properties(llama | ||
PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${LLAMA_INCLUDE_DIR}" | ||
INTERFACE_LINK_LIBRARIES "${_llama_link_deps}" | ||
INTERFACE_COMPILE_DEFINITIONS "${_llama_transient_defines}" | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" | ||
IMPORTED_LOCATION "${llama_LIBRARY}" | ||
INTERFACE_COMPILE_FEATURES cxx_std_11 | ||
POSITION_INDEPENDENT_CODE ON ) | ||
|
||
check_required_components(Llama) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
exec_prefix=${prefix} | ||
libdir=${exec_prefix}/lib | ||
includedir=${prefix}/include | ||
|
||
Name: whisper | ||
Description: Port of OpenAI's Whisper model in C/C++ | ||
Version: @PROJECT_VERSION@ | ||
Libs: -L${libdir} -lwhisper | ||
Cflags: -I${includedir} |
Oops, something went wrong.