Skip to content

Commit

Permalink
test mps
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jul 23, 2024
1 parent c45aecd commit b980223
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test_cli_mps_pytorch.yaml
Original file line number Diff line number Diff line change
@@ -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"
11 changes: 11 additions & 0 deletions tests/configs/mps_inference_pytorch_text_decoders.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions tests/configs/mps_inference_pytorch_text_encoders.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions tests/configs/mps_inference_pytorch_text_encoders_decoders.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b980223

Please sign in to comment.