Skip to content

Commit

Permalink
wip2
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren committed Dec 1, 2024
1 parent 55209f0 commit 0ba030c
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
arch: [avx, avx2, avx512, amx]
include:
- { sys: UCRT64, env: ucrt-x86_64, build: Release }
- { arch: avx, defines: '-DGGML_AVX=ON -DGGML_AVX2=OFF -DGGML_AVX512=OFF -DGGML_AMX_TILE=OFF -DGGML_AMX_INT8=OFF' }
- { arch: avx2, defines: '-DGGML_AVX=ON -DGGML_AVX2=ON -DGGML_AVX512=OFF -DGGML_AMX_TILE=OFF -DGGML_AMX_INT8=OFF' }
- { arch: avx512, defines: '-DGGML_AVX=ON -DGGML_AVX2=ON -DGGML_AVX512=ON -DGGML_AMX_TILE=OFF -DGGML_AMX_INT8=OFF' }
- { arch: amx, defines: '-DGGML_AVX=ON -DGGML_AVX2=ON -DGGML_AVX512=ON -DGGML_AMX_TILE=ON -DGGML_AMX_INT8=ON' }

steps:
- name: Clone
Expand All @@ -58,19 +62,10 @@ jobs:
mingw-w64-${{matrix.env}}-cmake
mingw-w64-${{matrix.env}}-ninja
- name: Configure
shell: msys2 {0}
run: |
cmake -B build -G "Ninja Multi-Config" -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON \
-DGGML_AVX=${{ matrix.arch == 'avx' && 'ON' || 'OFF' }} \
-DGGML_AVX2=${{ matrix.arch == 'avx2' && 'ON' || 'OFF' }} \
-DGGML_AVX512=${{ matrix.arch == 'avx512' && 'ON' || 'OFF' }} \
-GGML_AMX_TILE=${{ matrix.arch == 'amx' && 'ON' || 'OFF' }} \
-GGML_AMX_INT8=${{ matrix.arch == 'amx' && 'ON' || 'OFF' }}
- name: Build using CMake
shell: msys2 {0}
run: |
cmake -B build -G "Ninja Multi-Config" -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON ${{ matrix.defines }}
cmake --build build --config ${{ matrix.build }} -t ggml-cpu
- name: Rename artifacts
Expand Down Expand Up @@ -111,11 +106,12 @@ jobs:
mingw-w64-${{matrix.env}}-toolchain
mingw-w64-${{matrix.env}}-cmake
mingw-w64-${{matrix.env}}-ninja
mingw-w64-${{matrix.env}}-curl
- name: Build using CMake
shell: msys2 {0}
run: |
cmake -B build -G "Ninja Multi-Config" -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON
cmake -B build -G "Ninja Multi-Config" -DLLAMA_CURL=ON -DLLAMA_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON
cmake --build build --config ${{ matrix.build }}
rm build/bin/Release/ggml-cpu.dll
Expand Down Expand Up @@ -145,6 +141,14 @@ jobs:
Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
7z a llama-${{ steps.tag.outputs.name }}-bin-msys2-cpu-${{ matrix.build }}.zip .\build\bin\Release\*
- name: Upload artifacts
id: upload_artifacts
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: actions/upload-artifact@v4
with:
path: llama-${{ steps.tag.outputs.name }}-bin-msys2-cpu-${{ matrix.build }}.zip
name: llama-${{ steps.tag.outputs.name }}-bin-msys2-cpu-${{ matrix.build }}.zip

release:
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}

Expand Down

0 comments on commit 0ba030c

Please sign in to comment.