From e77c87993dde86c6bf29469b1c5adda31d9058ef Mon Sep 17 00:00:00 2001 From: youben11 Date: Fri, 31 Mar 2023 17:56:28 +0100 Subject: [PATCH] fix(ci): use OpenMP library from torch to avoid conflicts read: https://discuss.python.org/t/conflicting-binary-extensions-in-different-packages/25332/8 --- .github/workflows/concrete_python_test_macos.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/concrete_python_test_macos.yml b/.github/workflows/concrete_python_test_macos.yml index e4d6a37eb..509bdea25 100644 --- a/.github/workflows/concrete_python_test_macos.yml +++ b/.github/workflows/concrete_python_test_macos.yml @@ -110,7 +110,14 @@ jobs: pip install $GITHUB_WORKSPACE/frontends/concrete-python/dist/*macos*.whl pip install -r $GITHUB_WORKSPACE/frontends/concrete-python/requirements.dev.txt - + + # MacOS x86 have conflict between our OpenMP library, and one from torch + # we fix it by using a single one (from torch) + # see discussion: https://discuss.python.org/t/conflicting-binary-extensions-in-different-packages/25332/8 + ls $(pwd)/.testenv/lib/python3.10/site-packages/torch/.dylibs/libiomp5.dylib \ + && rm .testenv/lib/python3.10/site-packages/concrete/.dylibs/libomp.dylib \ + && ln -s $(pwd)/.testenv/lib/python3.10/site-packages/torch/.dylibs/libiomp5.dylib .testenv/lib/python3.10/site-packages/concrete/.dylibs/libomp.dylib + cp -R $GITHUB_WORKSPACE/frontends/concrete-python/tests ./tests pytest tests -svv -n auto --key-cache "/tmp/KeySetCache" -m "not dataflow"