-
Notifications
You must be signed in to change notification settings - Fork 27
133 lines (122 loc) · 4.22 KB
/
Copy pathpytorch-bisect.yaml
File metadata and controls
133 lines (122 loc) · 4.22 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
name: PyTorch Bisect
on:
workflow_dispatch:
inputs:
benchmark:
description: Benchmark to bisect
required: true
type: choice
default: inductor
options:
- inductor
type:
description: Bisect type
required: true
type: choice
default: performance
options:
- functional
- performance
runner:
description: Hardware runner
required: true
type: choice
default: linux.dgx.b200
options:
- linux.dgx.b200
- mt-l-x86iamx-22-225-h100
repro_cmdline:
description: The command line to reproduce
required: true
type: string
good_commit:
description: Last known good PyTorch commit
required: true
type: string
bad_commit:
description: First known bad PyTorch commit
required: true
type: string
regression_threshold:
type: number
default: 10
description: |
Performance regression threshold in %
jobs:
bisect:
name: Run PyTorch Bisect
runs-on: ${{ inputs.runner }}
# mt- runners are ephemeral OSDC pods with no host CUDA toolchain, so build
# PyTorch inside a CUDA devel container. linux.dgx.b200 is a DGX host and
# keeps the bare-host path (fromJSON('null') => no container).
container: ${{ startsWith(inputs.runner, 'mt-') && fromJSON('{"image":"pytorch/pytorch:2.12.0-cuda13.0-cudnn9-devel","options":"--gpus all"}') || fromJSON('null') }}
env:
USE_UV: '1'
WORKSPACE_DIR: ${{ github.workspace }}
GOOD_COMMIT: ${{ inputs.good_commit }}
BAD_COMMIT: ${{ inputs.bad_commit }}
REPRO_CMDLINE: ${{ inputs.repro_cmdline }}
REGRESSION_THRESHOLD: ${{ inputs.regression_threshold }}
PYTORCH_REPO: pytorch/pytorch
FUNCTIONAL: ${{ inputs.type == 'functional' && '1' || '0' }}
# Inside the OSDC CUDA devel container CUDA lives at /usr/local/cuda; on the
# bare-host b200 path keep the workspace-local toolchain. run.sh requires
# CUDA_HOME to be non-empty.
CUDA_HOME: ${{ startsWith(inputs.runner, 'mt-') && '/usr/local/cuda' || format('{0}/torch-benchmarks/cuda', github.workspace) }}
CUDA_VERSION: "13.0"
permissions:
id-token: write
contents: read
steps:
- name: Configure git safe.directory
run: git config --global --add safe.directory '*' || true
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout tritonparse
uses: actions/checkout@v4
with:
repository: pytorch-labs/tritonparse
path: torch-benchmarks/tritonparse
ref: xz9/fix-bisect
fetch-depth: 0
- name: Checkout PyTorch
uses: actions/checkout@v4
with:
repository: pytorch/pytorch
path: torch-benchmarks/pytorch
submodules: recursive
fetch-depth: 0
- name: Checkout torchbench
uses: actions/checkout@v4
with:
repository: pytorch/benchmark
path: torch-benchmarks/benchmark
fetch-depth: 0
- name: Checkout torchvision
uses: actions/checkout@v4
with:
repository: pytorch/vision
path: torch-benchmarks/torchvision
fetch-depth: 0
- name: Install uv environment
uses: pytorch/test-infra/.github/actions/setup-uv@main
- name: Prepare bisect environment
shell: bash
run: |
set -eux
uv venv "${GITHUB_WORKSPACE}/torch-benchmarks/venv"
export VIRTUAL_ENV="${GITHUB_WORKSPACE}/torch-benchmarks/venv"
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV
echo "PYTORCH_SRC_DIR=$(realpath torch-benchmarks/pytorch)" >> $GITHUB_ENV
echo "VISION_SRC_DIR=$(realpath torch-benchmarks/torchvision)" >> $GITHUB_ENV
uv pip install -e torch-benchmarks/tritonparse
- name: Run PyTorch bisect
shell: bash
run: |
uv run .github/scripts/bisect/run.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: pytorch-bisect-logs
path: ${{ github.workspace }}/bisect_logs
retention-days: 30