diff --git a/.github/workflows/test_cli_mps_pytorch.yaml b/.github/workflows/test_cli_mps_pytorch.yaml new file mode 100644 index 00000000..699c98b9 --- /dev/null +++ b/.github/workflows/test_cli_mps_pytorch.yaml @@ -0,0 +1,47 @@ +name: CLI MPS Pytorch tests + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - .github/workflows/test_cli_mps_pytorch.yaml + - "optimum_benchmark/**" + - "docker/**" + - "tests/**" + - "setup.py" + pull_request: + branches: + - main + paths: + - .github/workflows/test_cli_mps_pytorch.yaml + - "optimum_benchmark/**" + - "docker/**" + - "tests/**" + - "setup.py" + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + +jobs: + run_cli_mps_pytorch_tests: + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install requirements + run: | + pip install --upgrade pip + pip install -e .[testing,diffusers,timm,peft] + + - name: Run tests + run: pytest -s -k "cli and mps and pytorch" diff --git a/tests/configs/mps_inference_pytorch_text_decoders.yaml b/tests/configs/mps_inference_pytorch_text_decoders.yaml new file mode 100644 index 00000000..40619cc0 --- /dev/null +++ b/tests/configs/mps_inference_pytorch_text_decoders.yaml @@ -0,0 +1,11 @@ +defaults: + # order of inheritance, last one overrides previous ones + - _base_ # inherits from base config + - _mps_ # inherits from mps config + - _inference_ # inherits from inference config + - _text_decoders_ # inherits from text decoders config + - _no_weights_ # inherits from no weights config + - _self_ # hydra 1.1 compatibility + - override backend: pytorch + +name: mps_inference_pytorch_text_decoders diff --git a/tests/configs/mps_inference_pytorch_text_encoders.yaml b/tests/configs/mps_inference_pytorch_text_encoders.yaml new file mode 100644 index 00000000..f75b3712 --- /dev/null +++ b/tests/configs/mps_inference_pytorch_text_encoders.yaml @@ -0,0 +1,11 @@ +defaults: + # order of inheritance, last one overrides previous ones + - _base_ # inherits from base config + - _mps_ # inherits from mps config + - _inference_ # inherits from inference config + - _text_encoders_ # inherits from text encoders config + - _no_weights_ # inherits from no weights config + - _self_ # hydra 1.1 compatibility + - override backend: pytorch + +name: mps_inference_pytorch_text_encoders diff --git a/tests/configs/mps_inference_pytorch_text_encoders_decoders.yaml b/tests/configs/mps_inference_pytorch_text_encoders_decoders.yaml new file mode 100644 index 00000000..7992a639 --- /dev/null +++ b/tests/configs/mps_inference_pytorch_text_encoders_decoders.yaml @@ -0,0 +1,11 @@ +defaults: + # order of inheritance, last one overrides previous ones + - _base_ # inherits from base config + - _mps_ # inherits from mps config + - _inference_ # inherits from inference config + - _text_encoders_decoders_ # inherits from text encoders decoders config + - _no_weights_ # inherits from no weights config + - _self_ # hydra 1.1 compatibility + - override backend: pytorch + +name: mps_inference_pytorch_text_encoders_decoders