Skip to content

Commit

Permalink
FIX SVE CI latency regression (#3918)
Browse files Browse the repository at this point in the history
Summary:
Sometimes between Sept 25 to Oct 2, downloading and linking against `openblas=*=*openmp*` package to run tests have caused a 4-7x slow down. Link it with the regular openblas package which is not compiled with `USE_OPENMP=1`. We will set the openblas omp threads via the environment variable `OPENBLAS_NUM_THREADS` according to https://github.com/OpenMathLib/OpenBLAS/wiki/Faq#multi-threaded

Pull Request resolved: #3918

Test Plan: SVE CI should finish within 40 minutes

Reviewed By: ramilbakhshyiev

Differential Revision: D64059860

Pulled By: mengdilin

fbshipit-source-id: 3ba2bda5fce5122f051421f459692f15ad5360a4
  • Loading branch information
mengdilin authored and facebook-github-bot committed Oct 8, 2024
1 parent 2e6551f commit c5aed7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 1 addition & 6 deletions .github/actions/build_cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ runs:
# install base packages for ARM64
if [ "${{ runner.arch }}" = "ARM64" ]; then
# installing libmamba-solver is necessary for openblas=*=*openmp*
conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive
# installing openblas that was compiled with USE_OPENMP=1.
# Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction
conda install -y -q -c conda-forge openblas=*=*openmp* gxx_linux-aarch64 sysroot_linux-aarch64
conda install -y -q -c conda-forge openblas gxx_linux-aarch64 sysroot_linux-aarch64
fi
# install base packages for X86_64
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ jobs:
uses: ./.github/actions/build_cmake
with:
opt_level: sve
env:
# Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction
OPENBLAS_NUM_THREADS: '1'
linux-x86_64-conda:
name: Linux x86_64 (conda)
needs: linux-x86_64-cmake
Expand Down

0 comments on commit c5aed7c

Please sign in to comment.