Small reformat of the GPU check

This commit is contained in:
DaniAndTheWeb 2023-01-19 19:23:40 +01:00 committed by GitHub
parent c09fb3d8f1
commit 48045545d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -109,6 +109,10 @@ if echo "$gpu_info" | grep -q "Navi"
then
export HSA_OVERRIDE_GFX_VERSION=10.3.0
fi
if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]
then
export TORCH_COMMAND="pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2"
fi
for preq in "${GIT}" "${python_cmd}"
do
@ -170,10 +174,6 @@ then
else
printf "\n%s\n" "${delimiter}"
printf "Launching launch.py..."
printf "\n%s\n" "${delimiter}"
if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]
then
export TORCH_COMMAND="pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2"
fi
printf "\n%s\n" "${delimiter}"
exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
fi