Skip to content

Commit

Permalink
Secure Instinct CI (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil authored Dec 9, 2024
1 parent 9c7f088 commit 72a843c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 72 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/test_api_rocm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,10 @@ jobs:
contains( github.event.pull_request.labels.*.name, 'api_rocm')
}}

runs-on: [self-hosted, amd-gpu, single-gpu]

container:
image: ghcr.io/huggingface/optimum-benchmark:latest-rocm
options: --ipc host
--shm-size "16gb"
--group-add video
--device /dev/kfd
--device /dev/dri
--env ROCR_VISIBLE_DEVICES
--env HIP_VISIBLE_DEVICES=0

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
pip install -e .[testing,timm,diffusers,codecarbon]
- name: Run tests
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
PUSH_REPO_ID: optimum-benchmark/rocm
run: |
pytest tests/test_api.py -x -s -k "api and cuda"
uses: huggingface/hf-workflows/.github/workflows/optimum_benchmark_instinct_ci.yaml@testing
with:
machine_type: single-gpu
install_extras: testing,timm,diffusers,codecarbon
pytest_keywords: api and cuda
secrets:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
56 changes: 10 additions & 46 deletions .github/workflows/test_cli_rocm_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,11 @@ jobs:
contains( github.event.pull_request.labels.*.name, 'cli_rocm_pytorch_single_gpu')
}}

runs-on: [self-hosted, amd-gpu, single-gpu]

container:
image: ghcr.io/huggingface/optimum-benchmark:latest-rocm
options: --ipc host
--group-add video
--device /dev/kfd
--device /dev/dri
--env ROCR_VISIBLE_DEVICES

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
pip install -e .[testing,diffusers,timm,peft,autoawq,auto-gptq]
- name: Run tests
run: |
pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not bnb"
uses: huggingface/hf-workflows/.github/workflows/optimum_benchmark_instinct_ci.yaml@testing
with:
machine_type: single-gpu
install_extras: testing,diffusers,timm,peft,autoawq,auto-gptq
pytest_keywords: cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not bnb

run_cli_rocm_pytorch_multi_gpu_tests:
if: ${{
Expand All @@ -64,28 +48,8 @@ jobs:
contains( github.event.pull_request.labels.*.name, 'cli_rocm_pytorch_multi_gpu')
}}

runs-on: [self-hosted, amd-gpu, multi-gpu]

container:
image: ghcr.io/huggingface/optimum-benchmark:latest-rocm
options: --ipc host
--group-add video
--device /dev/kfd
--device /dev/dri
--env ROCR_VISIBLE_DEVICES

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
pip install -e .[testing,diffusers,timm,deepspeed,peft,autoawq,auto-gptq] "deepspeed<0.15"
- name: Run tests (parallel)
run: |
pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (dp or ddp or device_map)"
- name: Run tests (sequential)
run: |
FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (deepspeed_inference)"
uses: huggingface/hf-workflows/.github/workflows/optimum_benchmark_instinct_ci.yaml@testing
with:
machine_type: multi-gpu
install_extras: testing,diffusers,timm,peft
pytest_keywords: cli and cuda and pytorch and (dp or ddp or device_map)

0 comments on commit 72a843c

Please sign in to comment.