Skip to content

PyTorch Bisect

PyTorch Bisect #1

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
- linux.aws.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 }}
env:
WORKSPACE_DIR: ${{ github.workspace }}
GOOD_COMMIT: ${{ inputs.good_commit }}
BAD_COMMIT: ${{ inputs.bad_commit }}
REGRESSION_THRESHOLD: ${{ inputs.regression_threshold }}
PYTORCH_REPO: pytorch/pytorch
FUNCTIONAL: ${{ inputs.type == 'functional' && '1' || '0' }}
REPRO_CMDLINE: ${{ inputs.command_arguments }}
CUDA_HOME: ${{ github.workspace }}/torch-benchmarks/cuda
permissions:
id-token: write
contents: read
steps:
- 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/add-torch-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 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