Skip to content

Commit

Permalink
Use ipexrun when using --use-ipex
Browse files Browse the repository at this point in the history
  • Loading branch information
Disty0 committed May 25, 2023
1 parent f9a71a1 commit e048679
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions webui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,20 @@ else
exit 1
fi

if [[ "$@" == *"--use-ipex"* ]]
then
echo "Setting OneAPI enviroment"
source /opt/intel/oneapi/setvars.sh
fi

if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ]
then
echo "Accelerating launch.py..."
exec accelerate launch --num_cpu_threads_per_process=6 launch.py "$@"
elif [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ] && [[ "$@" == *"--use-ipex"* ]]
then
echo "Ipexrun'ning launch.py..."
exec ipexrun launch.py "$@"
else
echo "Launching launch.py..."
exec "${python_cmd}" launch.py "$@"
Expand Down

0 comments on commit e048679

Please sign in to comment.