Automatic launch argument for AMD GPUs
This commit adds a few lines to detect if the system has an AMD gpu and adds an environment variable needed for torch to recognize the gpu.
This commit is contained in:
parent
82725f0ac4
commit
cbf4b3472b
8
webui.sh
8
webui.sh
@ -165,5 +165,11 @@ else
|
||||
printf "\n%s\n" "${delimiter}"
|
||||
printf "Launching launch.py..."
|
||||
printf "\n%s\n" "${delimiter}"
|
||||
exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
|
||||
gpu_info=$(lspci | grep VGA)
|
||||
if echo "$gpu_info" | grep -q "AMD"
|
||||
then
|
||||
HSA_OVERRIDE_GFX_VERSION=10.3.0 exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
|
||||
else
|
||||
exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user