Skip to content

Commit

Permalink
parallel and intel-cpu when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jun 7, 2024
1 parent e25f8d4 commit d289a09
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_bettertransformer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Test with pytest (stable pytorch)
working-directory: tests
run: |
pytest bettertransformer -s -vvvvv
pytest bettertransformer -n auto -s -vvvvv --durations=0
- name: Install dependencies 2
run: |
Expand All @@ -46,4 +46,4 @@ jobs:
- name: Test with pytest (nightly pytorch)
working-directory: tests
run: |
pytest bettertransformer -s -vvvvv
pytest bettertransformer -n auto -s -vvvvv --durations=0
2 changes: 1 addition & 1 deletion .github/workflows/test_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest cli -s -vvvv --durations=0
pytest cli -n auto -s -vvvv --durations=0
9 changes: 5 additions & 4 deletions .github/workflows/test_export_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -37,13 +37,14 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/onnx -n auto -m "not tensorflow_test and not timm_test" -s --durations=0
pytest exporters/onnx -m "not tensorflow_test and not timm_test" -n auto -s -vvvv --durations=0
- name: Install dependencies for tensorflow export
run: |
pip install --no-cache-dir torch==2.1.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[tests,exporters-tf]
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/onnx -n auto -m "tensorflow_test" -s --durations=0
pytest exporters/onnx -m "tensorflow_test" -n auto -s -vvvv --durations=0
6 changes: 3 additions & 3 deletions .github/workflows/test_export_onnx_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -37,4 +37,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx -n auto -m "not tensorflow_test and not timm_test" -s --durations=0
pytest exporters/onnx -m "not tensorflow_test and not timm_test" -n auto -s -vvvv --durations=0
4 changes: 2 additions & 2 deletions .github/workflows/test_export_onnx_cli_timm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test_export_onnx_timm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -29,11 +29,12 @@ jobs:

- name: Install dependencies for pytorch export
run: |
pip install --upgrade pip
pip install .[tests,exporters]
- name: Test with pytest
working-directory: tests
env:
RUN_SLOW: "1"
run: |
pytest exporters/onnx/ -s -n auto -k "timm" --durations=0
pytest exporters/onnx -k "timm" -n auto -s -vvvv --durations=0
7 changes: 4 additions & 3 deletions .github/workflows/test_export_tflite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -36,9 +36,10 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --no-cache-dir torch==2.1.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[tests,exporters-tf]
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite -s -vvvv --durations=0
pytest exporters/tflite/test_tflite_export.py -k "not quantization" -n auto -s -vvvv --durations=0
4 changes: 2 additions & 2 deletions .github/workflows/test_export_tflite_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
python-version: [3.8, 3.9]

runs-on: []
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
Expand All @@ -42,4 +42,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite -n auto -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "not quantization" -n auto -s -vvvv --durations=0
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite/test_exporters_tflite_cli.py -n auto -k "int8_dynamic_quantization" -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "int8_dynamic_quantization" -n auto -s -vvvv --durations=0
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -42,4 +43,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite/test_exporters_tflite_cli.py -n auto -k "float16_quantization" -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "float16_quantization" -n auto -s -vvvv --durations=0
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -42,4 +42,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/tflite/test_exporters_tflite_cli.py -n auto -k "full_int8_quantization_with_default_dataset" -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "full_int8_quantization_with_default_dataset" -n auto -s -vvvv --durations=0
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -42,4 +42,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite/test_exporters_tflite_cli.py -n auto -k "tflite_int8_quantization_with_custom_dataset" -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "tflite_int8_quantization_with_custom_dataset" -n auto -s -vvvv --durations=0
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -42,4 +42,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite/test_exporters_tflite_cli.py -n auto -k "tflite_int8_quantization_with_default_dataset" -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "tflite_int8_quantization_with_default_dataset" -n auto -s -vvvv --durations=0
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -42,4 +42,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest exporters/tflite/test_exporters_tflite_cli.py -n auto -k "tflite_int8x16_quantization_with_default_dataset" -s -vvvv --durations=0
pytest exporters/tflite/test_exporters_tflite_cli.py -k "tflite_int8x16_quantization_with_default_dataset" -n auto -s -vvvv --durations=0
7 changes: 4 additions & 3 deletions .github/workflows/test_exporters_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
runs-on: [intel-cpu, 8-cpu, ci]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -31,9 +31,10 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --no-cache-dir torch==2.1.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[tests,exporters-tf]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/common -s -vvvv --durations=0
pytest exporters/common -n auto -s -vvvv --durations=0
2 changes: 1 addition & 1 deletion .github/workflows/test_fx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
pytest fx/optimization -s -vvvv --durations=0
pytest fx/optimization -n auto -s -vvvv --durations=0
2 changes: 1 addition & 1 deletion .github/workflows/test_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
pytest onnx -s -vvvv --durations=0
pytest onnx -n auto -s -vvvv --durations=0
4 changes: 2 additions & 2 deletions .github/workflows/test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
- name: Test with pytest (in series)
working-directory: tests
run: |
pytest onnxruntime -m "run_in_series" --durations=0 -vvvv -s
pytest onnxruntime -m "run_in_series" -s -vvvv --durations=0
- name: Test with pytest (in parallel)
working-directory: tests
run: |
pytest onnxruntime -m "not run_in_series" --durations=0 -vvvv -s -n auto
pytest onnxruntime -m "not run_in_series" -n auto -s -vvvv --durations=0
3 changes: 2 additions & 1 deletion .github/workflows/test_optimum_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ jobs:
pip install .[tests]
- name: Test with unittest
working-directory: tests
shell: bash
run: |
# Setting HUGGINGFACE_CO_STAGING to true for only one job of the matrix as the staging tests cannot run in parallel.
export HUGGINGFACE_CO_STAGING=${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-20.04' }}
pytest tests/test_*.py
pytest tests/test_*.py -s -vvvv --durations=0
4 changes: 2 additions & 2 deletions .github/workflows/test_utils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-13]
python-version: [3.8, 3.9]
os: [ubuntu-20.04, macos-13]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -37,4 +37,4 @@ jobs:
- name: Test with pytest
working-directory: tests
run: |
python -m pytest -s -vvvv utils
pytest utils -n auto -s -vvvv --durations=0

0 comments on commit d289a09

Please sign in to comment.