-
Notifications
You must be signed in to change notification settings - Fork 4
183 lines (161 loc) · 5.52 KB
/
gpu-tests.yml
File metadata and controls
183 lines (161 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# Copyright (c) 2024-2026, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
# GPU tests run on NVIDIA on-prem self-hosted runners and use the copy-pr-bot
# pattern: PRs are tested via push events to pull-request/* branches rather
# than pull_request events.
# See: https://docs.gha-runners.nvidia.com/platform/apps/copy-pr-bot/
# ---------------------------------------------------------------------------
name: GPU Tests
on:
schedule:
# Nightly at 02:00 UTC.
- cron: '0 2 * * *'
# disabled for now to avoid running on PRs
# push:
# branches:
# - "pull-request/[0-9]+"
workflow_dispatch:
inputs:
suite:
description: "GPU test suite to run"
required: true
default: all
type: choice
options:
- all
- smoke
- e2e
defaults:
run:
shell: bash -x -e -u -o pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect changes
if: github.event_name != 'workflow_dispatch'
runs-on: linux-amd64-cpu4
permissions:
contents: read
outputs:
src_test_deps: ${{ steps.changes.outputs.src_test_deps }}
steps:
- uses: actions/checkout@v6
- name: Detect changes
id: changes
uses: ./.github/actions/detect-changes
gpu-smoke-test:
name: GPU Smoke Tests
needs: changes
# `changes` is intentionally skipped on workflow_dispatch. `always()` lets
# manual runs bypass that skipped dependency and run the selected GPU suite.
if: >-
${{
always() &&
(
github.event_name == 'workflow_dispatch' ||
needs.changes.outputs.src_test_deps == 'true'
) &&
(
github.event_name != 'workflow_dispatch' ||
inputs.suite == 'all' ||
inputs.suite == 'smoke'
)
}}
timeout-minutes: 30
runs-on: linux-amd64-gpu-a100-latest-1
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup GPU test environment
uses: ./.github/actions/setup-gpu-test-env
- name: Run GPU smoke tests - train only
timeout-minutes: 10
run: make test-smoke-gpu-train-only
- name: Run GPU smoke tests - generation
timeout-minutes: 10
run: make test-smoke-gpu-generation
- name: Run GPU smoke tests - resume
timeout-minutes: 10
run: make test-smoke-gpu-resume
- name: Run GPU smoke tests - structured generation
timeout-minutes: 10
run: make test-smoke-gpu-structured-generation
- name: Run GPU smoke tests - timeseries
timeout-minutes: 10
run: make test-smoke-gpu-timeseries
- name: Run GPU smoke tests - SmolLM2
timeout-minutes: 20
run: make test-smoke-gpu-smollm2
gpu-e2e-test:
name: GPU E2E Tests
needs: changes
# `changes` is intentionally skipped on workflow_dispatch. `always()` lets
# manual runs bypass that skipped dependency and run the selected GPU suite.
if: >-
${{
always() &&
(
github.event_name == 'workflow_dispatch' ||
needs.changes.outputs.src_test_deps == 'true'
) &&
(
github.event_name != 'workflow_dispatch' ||
inputs.suite == 'all' ||
inputs.suite == 'e2e'
)
}}
timeout-minutes: 60
runs-on: linux-amd64-gpu-a100-latest-1
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup GPU test environment
uses: ./.github/actions/setup-gpu-test-env
- name: Run GPU E2E tests
timeout-minutes: 45
run: make test-e2e
# ---------------------------------------------------------------------------
# Single required status check for branch protection.
# Smoke tests are required; E2E failures produce a warning but don't block.
# ---------------------------------------------------------------------------
gpu-ci-status:
name: GPU CI Status
if: always() && !cancelled()
needs: [changes, gpu-smoke-test, gpu-e2e-test]
runs-on: linux-amd64-cpu4
steps:
- name: Check job results
run: |
echo "changes: ${{ needs.changes.result }}"
echo "gpu-smoke-test: ${{ needs.gpu-smoke-test.result }}"
echo "gpu-e2e-test: ${{ needs.gpu-e2e-test.result }}"
if [[ "${{ needs.changes.result }}" == "failure" ]]; then
echo "::error::Change detection failed"
exit 1
fi
if [[ "${{ needs.gpu-smoke-test.result }}" == "failure" ]]; then
echo "::error::GPU smoke tests failed (required)"
exit 1
fi
if [[ "${{ needs.gpu-e2e-test.result }}" == "failure" ]]; then
echo "::warning::GPU E2E tests failed (informational, does not block merge)"
fi
echo "All required GPU jobs passed (or were skipped)."