Unverified Commit cbf4b347 authored by DaniAndTheWeb's avatar DaniAndTheWeb Committed by GitHub

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.
parent 82725f0a
...@@ -165,5 +165,11 @@ else ...@@ -165,5 +165,11 @@ else
printf "\n%s\n" "${delimiter}" printf "\n%s\n" "${delimiter}"
printf "Launching launch.py..." printf "Launching launch.py..."
printf "\n%s\n" "${delimiter}" printf "\n%s\n" "${delimiter}"
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}" "$@" exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
fi
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment