-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into support_glm_edge_model
- Loading branch information
Showing
212 changed files
with
25,244 additions
and
5,934 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
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
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 |
---|---|---|
|
@@ -317,7 +317,7 @@ jobs: | |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - | ||
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | ||
sudo apt-get update -y | ||
sudo apt-get install -y build-essential vulkan-sdk | ||
sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk | ||
- name: Build | ||
id: cmake_build | ||
|
@@ -327,6 +327,12 @@ jobs: | |
cmake -DGGML_VULKAN=ON .. | ||
cmake --build . --config Release -j $(nproc) | ||
- name: Test | ||
id: cmake_test | ||
run: | | ||
cd build | ||
ctest -L main --verbose --timeout 900 | ||
ubuntu-22-cmake-hip: | ||
runs-on: ubuntu-22.04 | ||
container: rocm/dev-ubuntu-22.04:6.0.2 | ||
|
@@ -552,35 +558,44 @@ jobs: | |
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml | ||
cmake --build . --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO | ||
# TODO: tmp disabled. see for possible re-enable: | ||
# https://github.com/ggerganov/llama.cpp/pull/10525 | ||
# macOS-latest-swift: | ||
# runs-on: macos-latest | ||
# | ||
# strategy: | ||
# matrix: | ||
# destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS'] | ||
# | ||
# steps: | ||
# - name: Clone | ||
# id: checkout | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Dependencies | ||
# id: depends | ||
# continue-on-error: true | ||
# run: | | ||
# brew update | ||
# | ||
# - name: xcodebuild for swift package | ||
# id: xcodebuild | ||
# run: | | ||
# xcodebuild -scheme llama -destination "${{ matrix.destination }}" | ||
# | ||
# - name: Build Swift Example | ||
# id: make_build_swift_example | ||
# run: | | ||
# make swift | ||
macOS-latest-swift: | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
matrix: | ||
destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS'] | ||
|
||
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Dependencies | ||
id: depends | ||
continue-on-error: true | ||
run: | | ||
brew update | ||
- name: Build llama.cpp with CMake | ||
id: cmake_build | ||
run: | | ||
sysctl -a | ||
mkdir build | ||
cd build | ||
cmake -G Xcode .. \ | ||
-DGGML_METAL_USE_BF16=ON \ | ||
-DGGML_METAL_EMBED_LIBRARY=ON \ | ||
-DLLAMA_BUILD_EXAMPLES=OFF \ | ||
-DLLAMA_BUILD_TESTS=OFF \ | ||
-DLLAMA_BUILD_SERVER=OFF \ | ||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" | ||
cmake --build . --config Release -j $(sysctl -n hw.logicalcpu) | ||
sudo cmake --install . --config Release | ||
- name: xcodebuild for swift package | ||
id: xcodebuild | ||
run: | | ||
xcodebuild -scheme llama-Package -destination "${{ matrix.destination }}" | ||
windows-msys2: | ||
runs-on: windows-latest | ||
|
@@ -653,6 +668,8 @@ jobs: | |
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON' | ||
- build: 'msvc-arm64' | ||
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON' | ||
- build: 'llvm-arm64-opencl-adreno' | ||
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON' | ||
|
||
steps: | ||
- name: Clone | ||
|
@@ -694,6 +711,28 @@ jobs: | |
run: | | ||
choco install ninja | ||
- name: Install OpenCL Headers and Libs | ||
id: install_opencl | ||
if: ${{ matrix.build == 'llvm-arm64-opencl-adreno' }} | ||
run: | | ||
git clone https://github.com/KhronosGroup/OpenCL-Headers | ||
cd OpenCL-Headers | ||
mkdir build && cd build | ||
cmake .. ` | ||
-DBUILD_TESTING=OFF ` | ||
-DOPENCL_HEADERS_BUILD_TESTING=OFF ` | ||
-DOPENCL_HEADERS_BUILD_CXX_TESTS=OFF ` | ||
-DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release" | ||
cmake --build . --target install | ||
git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader | ||
cd OpenCL-ICD-Loader | ||
mkdir build-arm64-release && cd build-arm64-release | ||
cmake .. ` | ||
-A arm64 ` | ||
-DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" ` | ||
-DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release" | ||
cmake --build . --target install --config release | ||
- name: Build | ||
id: cmake_build | ||
run: | | ||
|
@@ -723,7 +762,7 @@ jobs: | |
- name: Test | ||
id: cmake_test | ||
# not all machines have native AVX-512 | ||
if: ${{ matrix.build != 'msvc-arm64' && matrix.build != 'llvm-arm64' && matrix.build != 'kompute-x64' && matrix.build != 'vulkan-x64' && (matrix.build != 'avx512-x64' || env.HAS_AVX512F == '1') }} | ||
if: ${{ matrix.build != 'msvc-arm64' && matrix.build != 'llvm-arm64' && matrix.build != 'llvm-arm64-opencl-adreno' && matrix.build != 'kompute-x64' && matrix.build != 'vulkan-x64' && (matrix.build != 'avx512-x64' || env.HAS_AVX512F == '1') }} | ||
run: | | ||
cd build | ||
ctest -L main -C Release --verbose --timeout 900 | ||
|
@@ -1104,6 +1143,29 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build | ||
id: cmake_build | ||
run: | | ||
sysctl -a | ||
mkdir build | ||
cd build | ||
cmake -G Xcode .. \ | ||
-DGGML_METAL_USE_BF16=ON \ | ||
-DGGML_METAL_EMBED_LIBRARY=ON \ | ||
-DLLAMA_BUILD_EXAMPLES=OFF \ | ||
-DLLAMA_BUILD_TESTS=OFF \ | ||
-DLLAMA_BUILD_SERVER=OFF \ | ||
-DCMAKE_SYSTEM_NAME=iOS \ | ||
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \ | ||
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml | ||
cmake --build . --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO | ||
sudo cmake --install . --config Release | ||
- name: xcodebuild for swift package | ||
id: xcodebuild | ||
run: | | ||
xcodebuild -scheme llama-Package -destination 'generic/platform=iOS' | ||
- name: Build Xcode project | ||
run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' build | ||
|
||
|
@@ -1131,23 +1193,6 @@ jobs: | |
./gradlew build --no-daemon | ||
# freeBSD-latest: | ||
# runs-on: macos-12 | ||
# steps: | ||
# - name: Clone | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Build | ||
# uses: cross-platform-actions/[email protected] | ||
# with: | ||
# operating_system: freebsd | ||
# version: '13.2' | ||
# hypervisor: 'qemu' | ||
# run: | | ||
# sudo pkg update | ||
# sudo pkg install -y gmake automake autoconf pkgconf llvm15 openblas | ||
# gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15 -j `sysctl -n hw.ncpu` | ||
|
||
release: | ||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }} | ||
|
||
|
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
Oops, something went wrong.