-
Notifications
You must be signed in to change notification settings - Fork 44
135 lines (129 loc) · 3.76 KB
/
e2e-accuracy.yml
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
name: E2E accuracy
run-name: ${{ inputs.run_name }}
on:
workflow_dispatch:
inputs:
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
default: ""
suite:
description: Test suite
type: choice
options:
- all
- huggingface
- timm_models
- torchbench
default: all
mode:
description: Inference, inference-no-freezing, or training
type: choice
options:
- all
- inference
- inference-no-freezing
- training
default: all
dtype:
description: Data type
type: choice
options:
- all
- amp_bf16
- amp_fp16
- bfloat16
- float16
- float32
default: all
models:
description: Run all models or a subset from .github/models/performance/{suite}.txt
type: choice
options:
- all
- subset
default: all
check_all_subset_models:
description: In "subset" mode, check all subset models
type: boolean
default: false
only_one_model:
description: Run only this one model
type: string
default: ""
runner_label:
description: Runner label, keep empty for default
type: string
default: ""
TORCH_COMPILE_DEBUG:
description: TORCH_COMPILE_DEBUG
type: string
default: ""
run_name:
description: Custom run name
type: string
default: "E2E accuracy"
permissions: read-all
jobs:
setup:
name: Setup
runs-on: Linux
outputs:
suite: ${{ steps.set-matrix.outputs.suite }}
mode: ${{ steps.set-matrix.outputs.mode }}
dtype: ${{ steps.set-matrix.outputs.dtype }}
timeout-minutes: 10
steps:
- name: Set matrix
id: set-matrix
run: |
if [[ -z "${{ inputs.suite }}" || "${{ inputs.suite }}" == "all" ]]; then
suite='["huggingface", "timm_models", "torchbench"]'
else
suite='["${{ inputs.suite }}"]'
fi
if [[ -z "${{ inputs.mode }}" || "${{ inputs.mode }}" == "all" ]]; then
mode='["inference", "inference-no-freezing", "training"]'
else
mode='["${{ inputs.mode }}"]'
fi
if [[ -z "${{ inputs.dtype }}" || "${{ inputs.dtype }}" == "all" ]]; then
dtype='["amp_bf16", "amp_fp16", "bfloat16", "float16", "float32"]'
else
dtype='["${{ inputs.dtype }}"]'
fi
echo "suite=$suite" >> $GITHUB_OUTPUT
echo "mode=$mode" >> $GITHUB_OUTPUT
echo "dtype=$dtype" >> $GITHUB_OUTPUT
print_inputs:
name: Print inputs
needs: setup
runs-on: Linux
steps:
- name: Print inputs
run: |
echo "${{ toJSON(github.event.inputs) }}"
- name: Print setup outputs
run: |
echo "${{ toJSON(needs.setup.outputs) }}"
run_tests:
name: Run test matrix
needs: setup
strategy:
matrix:
suite: ${{ fromJson(needs.setup.outputs.suite) }}
mode: ${{ fromJson(needs.setup.outputs.mode) }}
dtype: ${{ fromJson(needs.setup.outputs.dtype) }}
fail-fast: false
uses: ./.github/workflows/e2e-reusable.yml
with:
pytorch_ref: ${{ inputs.pytorch_ref }}
suite: ${{ matrix.suite }}
mode: ${{ matrix.mode }}
test_mode: accuracy
dtype: ${{ matrix.dtype }}
models: ${{ inputs.models }}
check_all_subset_models: ${{ inputs.check_all_subset_models || false }}
only_one_model: ${{ inputs.only_one_model }}
runner_label: ${{ inputs.runner_label }}
TORCH_COMPILE_DEBUG: ${{ inputs.TORCH_COMPILE_DEBUG }}