Skip to content

Commit

Permalink
Merge pull request #244 from LibRapid/develop
Browse files Browse the repository at this point in the history
Better BLAS integration and Apple Accelerate Support
  • Loading branch information
Pencilcaseman authored Oct 6, 2023
2 parents b603e8c + 679ef14 commit cfd8942
Show file tree
Hide file tree
Showing 11 changed files with 533 additions and 377 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
compile:
name: Compile on ${{ matrix.os }} with ${{ matrix.cxx }} (BLAS ${{ matrix.blas }}, FFTW ${{ matrix.fftw }}, MPFR ${{ matrix.mpfr }}, C++ ${{ matrix.cpp }})
name: Compile on ${{ matrix.os }} with ${{ matrix.cxx }} (BLAS ${{ matrix.blas }}, Get BLAS ${{ matrix.getBlas }}, FFTW ${{ matrix.fftw }}, MPFR ${{ matrix.mpfr }}, C++ ${{ matrix.cpp }})
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -23,6 +23,7 @@ jobs:
cxx: ../llvm/bin/clang++
clangVer: "15.0"
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -33,6 +34,7 @@ jobs:
cxx: ../llvm/bin/clang++
clangVer: "15.0"
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 20
Expand All @@ -42,6 +44,7 @@ jobs:
cc: gcc-10
cxx: g++-10
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -51,6 +54,7 @@ jobs:
cc: gcc-10
cxx: g++-10
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 20
Expand All @@ -60,6 +64,7 @@ jobs:
cc: gcc-10
cxx: g++-10
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 23
Expand All @@ -69,6 +74,7 @@ jobs:
cc: gcc-10
cxx: g++-10
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 23
Expand All @@ -78,6 +84,7 @@ jobs:
cc: gcc-11
cxx: g++-11
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -87,6 +94,7 @@ jobs:
cc: gcc-11
cxx: g++-11
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 20
Expand All @@ -96,6 +104,7 @@ jobs:
cc: gcc-11
cxx: g++-11
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 23
Expand All @@ -105,6 +114,7 @@ jobs:
cc: gcc-11
cxx: g++-11
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 23
Expand All @@ -115,6 +125,7 @@ jobs:
cxx: ../llvm/bin/clang++
clangVer: "15.0"
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -125,6 +136,7 @@ jobs:
cxx: ../llvm/bin/clang++
clangVer: "15.0"
blas: on
getBlas: off # Included with XCode
fftw: on
mpfr: on
cpp: 20
Expand All @@ -134,6 +146,7 @@ jobs:
cc: gcc-11
cxx: g++-11
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -142,7 +155,8 @@ jobs:
- os: macos-latest
cc: gcc-11
cxx: g++-11
blas: on
blas: on # Accelerate requires clang so we get blas
getBlas: on
fftw: on
mpfr: on
cpp: 20
Expand All @@ -152,6 +166,7 @@ jobs:
cc: gcc-11
cxx: g++-11
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 23
Expand All @@ -160,7 +175,8 @@ jobs:
- os: macos-latest
cc: gcc-11
cxx: g++-11
blas: on
blas: on # Accelerate Requires clang, so we get blas
getBlas: on
fftw: on
mpfr: on
cpp: 23
Expand All @@ -171,6 +187,7 @@ jobs:
cxx: ../llvm/clang++
clangVer: "15.0"
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -181,6 +198,7 @@ jobs:
cxx: ../llvm/clang++
clangVer: "15.0"
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 20
Expand All @@ -191,6 +209,7 @@ jobs:
cxx: ./llvm/clang++
clangVer: "15.0"
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 23
Expand All @@ -201,6 +220,7 @@ jobs:
cxx: ./llvm/clang++
clangVer: "15.0"
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 23
Expand All @@ -210,6 +230,7 @@ jobs:
cc: msvc
cxx: msvc
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 20
Expand All @@ -219,6 +240,7 @@ jobs:
cc: msvc
cxx: msvc
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 20
Expand All @@ -228,6 +250,7 @@ jobs:
cc: msvc
cxx: msvc
blas: off
getBlas: off
fftw: off
mpfr: on
cpp: 23
Expand All @@ -237,6 +260,7 @@ jobs:
cc: msvc
cxx: msvc
blas: on
getBlas: on
fftw: on
mpfr: on
cpp: 23
Expand All @@ -259,13 +283,15 @@ jobs:
- name: Install XCode
if: matrix.os == 'macos-latest'
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest

# Tests must pass in both debug and release mode
- name: Compile (Debug)
run: |
mkdir buildDebug
cd buildDebug
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DLIBRAPID_BUILD_EXAMPLES=on -DLIBRAPID_BUILD_TESTS=on -DLIBRAPID_GET_BLAS=${{ matrix.blas }} -DLIBRAPID_USE_MULTIPREC=${{ matrix.mpfr }}
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DLIBRAPID_BUILD_EXAMPLES=on -DLIBRAPID_BUILD_TESTS=on -DLIBRAPID_USE_BLAS=${{ matrix.blas }} -DLIBRAPID_GET_BLAS=${{ matrix.getBlas }} -DLIBRAPID_USE_MULTIPREC=${{ matrix.mpfr }}
cmake --build . --config Debug
env:
CC: ${{ matrix.cc }}
Expand All @@ -280,7 +306,7 @@ jobs:
run: |
mkdir buildRelease
cd buildRelease
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DLIBRAPID_BUILD_EXAMPLES=on -DLIBRAPID_BUILD_TESTS=on -DLIBRAPID_GET_BLAS=${{ matrix.blas }} -DLIBRAPID_USE_MULTIPREC=${{ matrix.mpfr }}
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DLIBRAPID_BUILD_EXAMPLES=on -DLIBRAPID_BUILD_TESTS=on -DLIBRAPID_USE_BLAS=${{ matrix.blas }} -DLIBRAPID_GET_BLAS=${{ matrix.getBlas }} -DLIBRAPID_USE_MULTIPREC=${{ matrix.mpfr }}
cmake --build . --config Release
env:
CC: ${{ matrix.cc }}
Expand Down Expand Up @@ -644,7 +670,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBRAPID_CODE_COV=on -DLIBRAPID_BUILD_EXAMPLES=on -DLIBRAPID_BUILD_TESTS=on -DLIBRAPID_GET_BLAS=ON -DLIBRAPID_GET_FFTW=on -DLIBRAPID_USE_MULTIPREC=on
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBRAPID_CODE_COV=on -DLIBRAPID_BUILD_EXAMPLES=on -DLIBRAPID_BUILD_TESTS=on -DLIBRAPID_USE_BLAS=ON -DLIBRAPID_GET_FFTW=on -DLIBRAPID_USE_MULTIPREC=on
cmake --build .
env:
CC: gcc-11
Expand Down
Loading

0 comments on commit cfd8942

Please sign in to comment.