mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-11-01 07:53:10 +08:00
Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
# NOTE: Make sure this file is consistent with .gitlab/tests.yml
|
|
name: GPU tests
|
|
|
|
on:
|
|
push:
|
|
branches: ["pull-request/[0-9]+"]
|
|
# NOTE: paths cannot be used since push happens to copied PR and only latest commit to PR is used
|
|
schedule:
|
|
- cron: "0 0 * * *" # Nightly
|
|
|
|
# Cancel previous runs if new commit is pushed to the same PR
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-file-changes:
|
|
if: startsWith(github.ref, 'refs/heads/pull-request/')
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
any_changed: ${{ steps.changed-tests.outputs.any_changed }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- id: get-pr-info
|
|
uses: nv-gha-runners/get-pr-info@main
|
|
- name: Check for changes in test-relevant directories
|
|
id: changed-tests
|
|
uses: step-security/changed-files@v46.0.5
|
|
with:
|
|
files: |
|
|
.github/workflows/gpu_tests.yml
|
|
modelopt/**
|
|
tests/gpu/**
|
|
tox.ini
|
|
pyproject.toml
|
|
setup.py
|
|
base_sha: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}
|
|
wait-checks:
|
|
needs: [check-file-changes]
|
|
if: needs.check-file-changes.outputs.any_changed == 'true'
|
|
uses: ./.github/workflows/_wait_for_checks.yml
|
|
permissions:
|
|
checks: read
|
|
secrets: inherit
|
|
with:
|
|
match_pattern: '^DCO$|^linux$' # Wait for DCO and Unit tests / linux to pass
|
|
delay: 300s
|
|
gpu-tests:
|
|
needs: [check-file-changes, wait-checks]
|
|
if: needs.check-file-changes.outputs.any_changed == 'true'
|
|
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md
|
|
runs-on: linux-amd64-gpu-h100-latest-1
|
|
timeout-minutes: 90
|
|
container:
|
|
image: nvcr.io/nvidia/pytorch:25.06-py3
|
|
env:
|
|
GIT_DEPTH: 1000 # For correct version for tests/gpu/torch/quantization/plugins/test_megatron.py
|
|
LD_LIBRARY_PATH: "/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}" # Add libcudnn*.so and libnv*.so to path.
|
|
PIP_CONSTRAINT: "" # Disable pip constraint for upgrading packages
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: nv-gha-runners/setup-proxy-cache@main
|
|
- name: Run gpu tests
|
|
run: pip install tox-current-env && tox -e py312-cuda12-gpu --current-env
|