Enable testing on GPUs #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GPU Enabled Test Suite on PRs | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- ci-* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
OPTIMUM_NVIDIA_IS_CI: ON | |
RUN_CPU_ONLY: OFF | |
RUN_NIGHTLY: OFF | |
RUN_SLOW: ON | |
jobs: | |
run_gpu_tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: GPU-enabled Optimum-Nvidia Test Suite | |
image: huggingface/optimum-nvidia | |
cuda_arch: [sm_86, sm_89] | |
name: ${{ matrix.config.name }} | |
runs-on: [ci, nvidia-gpu, "${{ matrix.config.cuda_arch }}"] | |
container: | |
image: ${{ matrix.config.image }} | |
options: --shm-size "16gb" --gpus all --ipc host -v /mnt/hf_cache:/mnt/cache/ | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout optimum-nvidia | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade -e .[quality,tests] | |
- name: Run fast optimum-nvidia GPU tests | |
run: | | |
python -m pytest -s -v -p no:warnings tests |