Skip to content

Commit

Permalink
disable omp for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez committed Nov 1, 2023
1 parent 6414f3f commit 3a47729
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
CIBW_ARCHS: all
CIBW_TEST_SKIP: '*-macosx_arm64'
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD_MACOS: pip install toml && python scripts/disable_macos_arm64.py

- uses: actions/upload-artifact@v3
with:
Expand Down
11 changes: 11 additions & 0 deletions scripts/disable_omp_arm64.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import platform

import toml


if platform.processor() == 'arm':
with open('pyproject.toml', 'rt') as f:
cfg = toml.load(f)
cfg['tool']['scikit-build']['cmake']['args'] = ['-DUSE_OPENMP=OFF']
with open('pyproject.toml', 'wt') as f:
toml.dump(cfg, f)

0 comments on commit 3a47729

Please sign in to comment.