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

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
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -165,5 +165,11 @@ else
    printf "\n%s\n" "${delimiter}"
    printf "Launching launch.py..."
    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}" "$@"
    fi
fi