xref: /aosp_15_r20/external/pytorch/benchmarks/dynamo/run_delta.sh (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1*da0073e9SAndroid Build Coastguard Worker#!/bin/bash
2*da0073e9SAndroid Build Coastguard Worker
3*da0073e9SAndroid Build Coastguard Workerset -x
4*da0073e9SAndroid Build Coastguard Worker
5*da0073e9SAndroid Build Coastguard Worker# Some QoL for people running this script on Meta servers
6*da0073e9SAndroid Build Coastguard Workerif getent hosts fwdproxy; then
7*da0073e9SAndroid Build Coastguard Worker    export https_proxy=http://fwdproxy:8080 http_proxy=http://fwdproxy:8080 no_proxy=.fbcdn.net,.facebook.com,.thefacebook.com,.tfbnw.net,.fb.com,.fburl.com,.facebook.net,.sb.fbsbx.com,localhost
8*da0073e9SAndroid Build Coastguard Workerfi
9*da0073e9SAndroid Build Coastguard Worker
10*da0073e9SAndroid Build Coastguard WorkerWORK="$PWD"
11*da0073e9SAndroid Build Coastguard Worker
12*da0073e9SAndroid Build Coastguard Workercd "$(dirname "$BASH_SOURCE")"/../..
13*da0073e9SAndroid Build Coastguard Worker
14*da0073e9SAndroid Build Coastguard WorkerROOT="$PWD"
15*da0073e9SAndroid Build Coastguard Worker
16*da0073e9SAndroid Build Coastguard Workermkdir -p "$WORK/sweep/static"
17*da0073e9SAndroid Build Coastguard Workermkdir -p "$WORK/sweep/dynamic"
18*da0073e9SAndroid Build Coastguard Worker
19*da0073e9SAndroid Build Coastguard Worker(cd "$WORK/sweep/static" && "$ROOT/benchmarks/dynamo/run_all.sh" "$@")
20*da0073e9SAndroid Build Coastguard Worker(cd "$WORK/sweep/dynamic" && "$ROOT/benchmarks/dynamo/run_all.sh" "$@" --dynamic-shapes)
21*da0073e9SAndroid Build Coastguard Workerpython benchmarks/dynamo/combine_csv.py "$WORK/sweep/static/final.csv" "$WORK/sweep/dynamic/final.csv" > "$WORK/delta.csv"
22*da0073e9SAndroid Build Coastguard Workergh gist create "$WORK/delta.csv"
23