Skip to content

Commit

Permalink
Fix error in webui.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DGdev91 committed Jun 5, 2023
1 parent 8d98532 commit 2788ce8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions webui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pyv="$(python -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')
gpu_info=$(lspci 2>/dev/null | grep -E "VGA|Display")
case "$gpu_info" in
*"Navi 1"*|*"Navi 2"*)
if [[ $(bc <<< "$pyv <= 3.10") -eq 1 ]]
then
export HSA_OVERRIDE_GFX_VERSION=10.3.0
# Navi users will still use torch 1.13 because 2.0 does not seem to work.
Expand Down

2 comments on commit 2788ce8

@richyliu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this works as intended, since bc will interpret 3.10 as 3.1, so 3.9 <= 3.10 results in 0 (false). Perhaps we can compare only the part after the decimal.

@DGdev91
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this works as intended, since bc will interpret 3.10 as 3.1, so 3.9 <= 3.10 results in 0 (false). Perhaps we can compare only the part after the decimal.

Sorry, i didn't saw you comment when you posted it. but... you are right.
Also, it requires bc to be installed, wich is not guaranteed.

Tbh, it doesn't even make much sense to compare the python version in bash when we can just do that in pyton.

Made a PR. #15224

Please sign in to comment.