33set -euo pipefail
44
55readonly SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
6- readonly DETECTOR=" ${WORKSPACE_DIR} /.ci /bisect/regression_detector.py"
6+ readonly DETECTOR=" ${WORKSPACE_DIR} /.github/scripts /bisect/regression_detector.py"
77
88required_envs=(
99 WORKSPACE_DIR
@@ -15,6 +15,7 @@ required_envs=(
1515 CUDA_HOME
1616 FUNCTIONAL
1717 REPRO_CMDLINE
18+ USE_UV
1819)
1920
2021for env_name in " ${required_envs[@]} " ; do
@@ -24,6 +25,11 @@ for env_name in "${required_envs[@]}"; do
2425 fi
2526done
2627
28+ if [ ! -e ${DETECTOR} ]; then
29+ echo " Missing detector script: ${DETECTOR} ."
30+ exit 1
31+ fi
32+
2733checkout_pytorch_commit () {
2834 local repo_dir=" $1 "
2935 local commit=" $2 "
@@ -47,14 +53,15 @@ bash ${tritonparse_dir}/bisect/scripts/prepare_build_pytorch.sh
4753BASELINE_LOG=" ${LOG_DIR} /baseline.log"
4854checkout_pytorch_commit " ${PYTORCH_SRC_DIR} " " ${GOOD_COMMIT} "
4955bash ${tritonparse_dir} /bisect/scripts/build_pytorch.sh
56+ cd ${PYTORCH_SRC_DIR}
5057eval ${REPRO_CMDLINE} 2>&1 | tee " ${BASELINE_LOG} "
5158
5259# step 3: build and run the bad commit
5360checkout_pytorch_commit " ${PYTORCH_SRC_DIR} " " ${BAD_COMMIT} "
5461bash ${tritonparse_dir} /bisect/scripts/build_pytorch.sh
5562# allow the regression detector to exit with error code
5663set +e
57- BASELINE_LOG=" ${BASELINE_LOG} " python ./.ci/bisect/regression_detector.py
64+ BASELINE_LOG=" ${BASELINE_LOG} " python " ${DETECTOR} "
5865PREFLIGHT_RC=$?
5966set -e
6067
@@ -70,7 +77,7 @@ elif [ ${PREFLIGHT_RC} -ne 1 ] && [ ${FUNCTIONAL} -ne 1 ]; then
7077fi
7178
7279# kick off the bisect!
73- BASELINE_LOG=" ${BASELINE_LOG} " USE_UV=0 \
80+ BASELINE_LOG=" ${BASELINE_LOG} " USE_UV=" ${USE_UV} " \
7481tritonparseoss bisect \
7582 --no-tui \
7683 --target torch \
0 commit comments