ray/release/microbenchmark/run.sh

61 lines
990 B
Bash
Raw Normal View History

2020-07-28 10:44:06 -07:00
#!/usr/bin/env bash
set -xe
ray_version=""
2020-07-28 10:44:06 -07:00
commit=""
ray_branch=""
usage() {
echo "Start one microbenchmark trial."
}
for i in "$@"
do
2020-07-30 16:39:28 -07:00
case "$i" in
2020-07-28 10:44:06 -07:00
--ray-version=*)
ray_version="${i#*=}"
;;
--commit=*)
commit="${i#*=}"
;;
--ray-branch=*)
ray_branch="${i#*=}"
;;
2020-10-22 17:04:41 -07:00
--workload=*)
workload="${i#*=}"
;;
2020-07-28 10:44:06 -07:00
--help)
usage
exit
;;
*)
echo "unknown arg, $2"
exit 1
;;
esac
done
2020-07-30 16:39:28 -07:00
if [ -z "$ray_version" ] || [ -z "$commit" ] || [ -z "$ray_branch" ]
2020-07-28 10:44:06 -07:00
then
echo "Provide --ray-version, --commit, and --ray-branch"
exit 1
fi
2020-10-22 17:04:41 -07:00
2020-07-28 10:44:06 -07:00
echo "version: $ray_version"
echo "commit: $commit"
echo "branch: $ray_branch"
2020-10-22 17:04:41 -07:00
echo "workload: $workload"
wheel="https://s3-us-west-2.amazonaws.com/ray-wheels/$ray_branch/$commit/ray-$ray_version-cp37-cp37m-manylinux2014_x86_64.whl"
2020-07-28 10:44:06 -07:00
pip uninstall -y -q ray
2020-10-22 17:04:41 -07:00
pip install --upgrade pip
pip install -U "$wheel"
2020-07-28 10:44:06 -07:00
unset RAY_ADDRESS
ray stop --force
2020-07-28 10:44:06 -07:00
OMP_NUM_THREADS=64 ray microbenchmark