Skip to content

Commit d403e66

Browse files
committed
add macos support
1 parent 8159e67 commit d403e66

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

azure-pipelines.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ jobs:
33
parameters:
44
name: Linux
55
vmImage: 'ubuntu-22.04'
6+
7+
- template: template.yml
8+
parameters:
9+
name: MacOS
10+
vmImage: 'macOS-13'

template.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,27 @@ jobs:
1010
vmImage: ${{ parameters.vmImage }}
1111

1212
steps:
13-
14-
- bash: |
15-
sudo apt-get update && \
16-
sudo apt-get -y install libopenblas-dev ninja-build
17-
displayName: 'Install OpenBLAS library'
13+
- ${{ if contains(parameters.vmImage, 'ubuntu') }}:
14+
- bash: |
15+
sudo apt-get update && \
16+
sudo apt-get -y install libopenblas-dev ninja-build libopenmpi-dev
17+
displayName: 'Install BLAS and MPI libraries'
18+
# on macOs, openblas is alreadey installed
19+
- ${{ if contains(parameters.vmImage, 'macOs') }}:
20+
- bash: |
21+
brew install ninja open-mpi
22+
displayName: 'Install BLAS and MPI libraries'
1823
1924
- bash : |
2025
git clone https://github.com/ggerganov/llama.cpp.git
2126
displayName: 'Clone llama.cpp git repository'
2227
2328
- bash : |
24-
cd llama.cpp && \
25-
mkdir cmake-build && \
26-
cd cmake-build && \
27-
cmake -DCMAKE_BUILD_TYPE=Release -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -G Ninja .. && \
28-
ninja
29-
displayName: 'Build llama.cpp using ninja'
29+
cd llama.cpp/cmake-build/bin && \
30+
./test-sampling && \
31+
./test-quantize-fns && \
32+
./test-quantize-perf
33+
displayName: 'Run basic tests'
3034
3135
- bash: |
3236
cd llama.cpp && \

0 commit comments

Comments
 (0)