Skip to content

Commit

Permalink
Build against libomp14 for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
mlxd committed Apr 22, 2024
1 parent 7ff0b52 commit a8c6580
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/wheel_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,17 @@ jobs:
path: ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }}
key: ${{ matrix.os }}-kokkos${{ matrix.kokkos_version }}-${{ matrix.exec_model }}

- name: Install clang
- name: Install libomp-14
if: ${{ matrix.exec_model }} == "OPENMP"
run: |
brew install libomp
mkdir -p ${{ github.workspace}}/libomp_install/${{ matrix.exec_model }}
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/openmp-14.0.6.src.tar.xz --output ${{ github.workspace }}/libomp_install/openmp-14.0.6.src.tar.xz
cd ${{ github.workspace }}/libomp_install
tar xvf openmp-14.0.6.src.tar.xz
cmake -BBuild . \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace}}/libomp_install/ \
-G Ninja
cmake --install ./Build
- name: Clone Kokkos libs
if: steps.kokkos-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -78,7 +86,7 @@ jobs:
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_CXX_COMPILER=g++ \
-DOpenMP_ROOT=$(brew --prefix libomp) \
-DOpenMP_ROOT=${{ matrix.exec_model }}/libomp_install \
-G Ninja
cmake --build ./Build --verbose
cmake --install ./Build
Expand Down Expand Up @@ -130,14 +138,15 @@ jobs:
# MacOS specific build settings
CIBW_BEFORE_ALL_MACOS: |
brew uninstall --force oclint
brew install libomp
# Python build settings
CIBW_BEFORE_BUILD: |
python -m pip install pybind11 ninja cmake~=3.24.0 setuptools scipy
PL_BACKEND: ${{ matrix.pl_backend }}

CMAKE_ARGS: "-DOpenMP_ROOT=${{ matrix.exec_model }}/libomp_install"

CIBW_BEFORE_TEST: |
python -m pip install -r requirements-tests.txt
if ${{ matrix.pl_backend == 'lightning_kokkos'}}; then SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv; fi
Expand Down

0 comments on commit a8c6580

Please sign in to comment.