fix: disable OpenMP parallelism in CI to avoid libomp crashes
- Set OMP_NUM_THREADS=1 to avoid OpenMP thread synchronization issues - Set MKL_NUM_THREADS=1 for single-threaded MKL operations - This prevents segfaults in LayerNorm on macOS CI runners - Addresses the libomp compatibility issues with PyTorch on Apple Silicon
This commit is contained in:
4
.github/workflows/build-reusable.yml
vendored
4
.github/workflows/build-reusable.yml
vendored
@@ -224,10 +224,12 @@ jobs:
|
|||||||
HF_HUB_DISABLE_SYMLINKS: 1
|
HF_HUB_DISABLE_SYMLINKS: 1
|
||||||
TOKENIZERS_PARALLELISM: false
|
TOKENIZERS_PARALLELISM: false
|
||||||
PYTORCH_ENABLE_MPS_FALLBACK: 0 # Disable MPS on macOS CI to avoid memory issues
|
PYTORCH_ENABLE_MPS_FALLBACK: 0 # Disable MPS on macOS CI to avoid memory issues
|
||||||
|
OMP_NUM_THREADS: 1 # Disable OpenMP parallelism to avoid libomp crashes
|
||||||
|
MKL_NUM_THREADS: 1 # Single thread for MKL operations
|
||||||
run: |
|
run: |
|
||||||
# Activate virtual environment
|
# Activate virtual environment
|
||||||
source .venv/bin/activate || source .venv/Scripts/activate
|
source .venv/bin/activate || source .venv/Scripts/activate
|
||||||
|
|
||||||
# Run all tests
|
# Run all tests
|
||||||
pytest tests/
|
pytest tests/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user