Skip to content

Commit

Permalink
ggml : reorganize source code + improve CMake (ggerganov#865)
Browse files Browse the repository at this point in the history
* scripts : update sync [no ci]

* ggml : move headers one up [no ci]

* files : reorganize + update CMake

ggml-ci

* cmake : build normal ggml library

ggml-ci

* cmake : link math library to test + remove ci for code cov

ggml-ci

* files : move public headers to include

ggml-ci
  • Loading branch information
ggerganov committed Jun 26, 2024
1 parent 5a4ecab commit 5378ea0
Show file tree
Hide file tree
Showing 94 changed files with 14,464 additions and 12,822 deletions.
36 changes: 3 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Configure CMake
working-directory: ./build
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_TEST_COVERAGE=ON -DGGML_CLBLAST=ON ..
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_CLBLAST=ON ..

- name: Build
working-directory: ./build
Expand All @@ -39,13 +39,6 @@ jobs:
working-directory: ./build
run: ctest --verbose --timeout 900

- name: Test Coverage
working-directory: ./build
run: |
llvm-profdata merge -sparse tests/*.profraw -o ggml.profdata
llvm-cov report ./bin/test-grad0 -instr-profile=ggml.profdata
llvm-cov report ./bin/test-opt -instr-profile=ggml.profdata
test-macos-metal:
runs-on: macos-13
env:
Expand All @@ -61,7 +54,7 @@ jobs:

- name: Configure CMake
working-directory: ./build
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_TEST_COVERAGE=ON -DGGML_METAL=OFF ..
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_METAL=OFF ..

- name: Build
working-directory: ./build
Expand All @@ -71,13 +64,6 @@ jobs:
working-directory: ./build
run: ctest --verbose --timeout 900

- name: Test Coverage
working-directory: ./build
run: |
xcrun llvm-profdata merge -sparse tests/*.profraw -o ggml.profdata
xcrun llvm-cov report ./bin/test-grad0 -instr-profile=ggml.profdata
xcrun llvm-cov report ./bin/test-opt -instr-profile=ggml.profdata
build:

strategy:
Expand Down Expand Up @@ -112,7 +98,7 @@ jobs:

- name: Configure CMake
working-directory: ./build
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_TEST_COVERAGE=ON -DGGML_METAL=OFF ..
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_METAL=OFF ..

- name: Build
working-directory: ./build
Expand All @@ -121,19 +107,3 @@ jobs:
- name: Test
working-directory: ./build
run: ctest --verbose --timeout 900

- name: Test Coverage for Ubuntu
if: matrix.os == 'ubuntu-latest'
working-directory: ./build
run: |
llvm-profdata merge -sparse tests/*.profraw -o ggml.profdata
llvm-cov report ./bin/test-grad0 -instr-profile=ggml.profdata
llvm-cov report ./bin/test-opt -instr-profile=ggml.profdata
- name: Test Coverage for MacOS
if: matrix.os == 'macos-latest'
working-directory: ./build
run: |
xcrun llvm-profdata merge -sparse tests/*.profraw -o ggml.profdata
xcrun llvm-cov report ./bin/test-grad0 -instr-profile=ggml.profdata
xcrun llvm-cov report ./bin/test-opt -instr-profile=ggml.profdata
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
build/
build-blas/
build-debug/
build-release/
build-sanitize-addr/
build-sanitize-thread/
build-cov/
build-ci-debug/
build-ci-release/
build-cublas/
build-*/
out/
tmp/
models/
Expand All @@ -19,6 +11,7 @@ CMakeSettings.json
.vscode/
.clangd

.venv/
.exrc
.cache
.DS_Store
Expand Down
Loading

0 comments on commit 5378ea0

Please sign in to comment.