Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/scripts/check_tuned_op_regression.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# Copyright (C) 2026, Advanced Micro Devices, Inc. All rights reserved.
#
# Wrap .github/scripts/compare_benchmark.py for the tuned_op_bench CI job.
# Prints a comparison table to stdout (captured by the job step into
# $GITHUB_STEP_SUMMARY). Exits 0 unless --fail-on-regress is passed and
# at least one REGRESS row is found.
#
# Usage: check_tuned_op_regression.sh <baseline_csv> <current_csv> [extra args...]
set -euo pipefail

BASE=${1:?baseline csv path required}
CURR=${2:?current csv path required}
shift 2

BASE_LABEL="baseline"
CURR_LABEL="current"
if [[ -n "${BASE_SHA:-}" ]]; then
BASE_LABEL="main(${BASE_SHA:0:7})"
fi
if [[ -n "${CURR_SHA:-}" ]]; then
CURR_LABEL="PR(${CURR_SHA:0:7})"
elif [[ -n "${GITHUB_SHA:-}" ]]; then
CURR_LABEL="${GITHUB_SHA:0:7}"
fi

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

python3 "${REPO_ROOT}/.github/scripts/compare_benchmark.py" \
"$BASE" "$CURR" \
--baseline-label "$BASE_LABEL" \
--current-label "$CURR_LABEL" \
--warn 1.10 \
--fail 1.15 \
"$@"
Loading
Loading