forked from ggerganov/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ggerganov:master' into script
- Loading branch information
Showing
157 changed files
with
19,939 additions
and
7,040 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG ONEAPI_VERSION=2024.0.1-devel-ubuntu22.04 | ||
ARG UBUNTU_VERSION=22.04 | ||
|
||
FROM intel/hpckit:$ONEAPI_VERSION as build | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
# for some reasons, "-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=Intel10_64lp -DLLAMA_NATIVE=ON" give worse performance | ||
RUN mkdir build && \ | ||
cd build && \ | ||
cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx && \ | ||
cmake --build . --config Release --target main server | ||
|
||
FROM ubuntu:$UBUNTU_VERSION as runtime | ||
|
||
COPY --from=build /app/build/bin/main /main | ||
COPY --from=build /app/build/bin/server /server | ||
|
||
ENV LC_ALL=C.utf8 | ||
|
||
ENTRYPOINT [ "/main" ] |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Nix aarch64 builds | ||
|
||
on: | ||
workflow_dispatch: # allows manual triggering | ||
schedule: | ||
# Rebuild daily rather than on every push because QEMU is expensive (e.g. | ||
# 1.5h instead of minutes with the cold cache). | ||
# | ||
# randint(0, 59), randint(0, 23) | ||
- cron: '26 12 * * *' | ||
# But also rebuild if we touched any of the Nix expressions: | ||
push: | ||
branches: | ||
- master | ||
paths: ['**/*.nix', 'flake.lock'] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths: ['**/*.nix', 'flake.lock'] | ||
|
||
jobs: | ||
nix-build-aarch64: | ||
if: ${{ vars.CACHIX_NAME != '' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install QEMU | ||
# Copy-paste from https://github.com/orgs/community/discussions/8305#discussioncomment-5888654 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y qemu-user-static qemu-system-aarch64 | ||
sudo usermod -a -G kvm $USER | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@v9 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
extra-conf: | | ||
extra-platforms = aarch64-linux | ||
extra-system-features = nixos-test kvm | ||
extra-substituters = https://${{ vars.CACHIX_NAME }}.cachix.org https://cuda-maintainers.cachix.org | ||
extra-trusted-public-keys = ${{ vars.CACHIX_PUBLIC_KEY }} cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E= | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
with: | ||
upstream-cache: https://${{ matrix.cachixName }}.cachix.org | ||
- name: Set-up cachix to push the results to | ||
uses: cachix/cachix-action@v13 | ||
with: | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
name: ${{ vars.CACHIX_NAME }} | ||
- name: Show all output paths | ||
run: > | ||
nix run github:nix-community/nix-eval-jobs | ||
-- --gc-roots-dir gcroot | ||
--flake | ||
".#packages.aarch64-linux" | ||
- name: Build | ||
run: > | ||
nix run github:Mic92/nix-fast-build | ||
-- --skip-cached --no-nom | ||
--systems aarch64-linux | ||
--flake | ||
".#checks.aarch64-linux" |
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
Oops, something went wrong.