Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Python version check for PyTorch installation compatibility #15390

Merged
merged 2 commits into from
Mar 30, 2024

Conversation

ochen1
Copy link
Contributor

@ochen1 ochen1 commented Mar 27, 2024

Description

you cannot use An arbitrary precision calculator language to compare python versions

eg. bc will think 3.10 and 3.1 are the same

As such, we must update the script to maintain a consistent two-decimal format for comparison by modifying the version calculation to ensure that the minor version is always represented with two decimal places.

Screenshots/videos:

pyv="$(${python_cmd} -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')"
if [[ $(bc <<< "$pyv <= 3.10") -eq 1 ]] 
then
    # Navi users will still use torch 1.13 because 2.0 does not seem to work.
    export TORCH_COMMAND="pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm5.6"
else
    printf "\e[1m\e[31mERROR: RX 5000 series GPUs must be using at max python 3.10, aborting...\e[0m"
    exit 1
fi

image
image

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev March 30, 2024 04:30
@AUTOMATIC1111
Copy link
Owner

welp i fucked the merge

@AUTOMATIC1111 AUTOMATIC1111 merged commit 470d402 into AUTOMATIC1111:dev Mar 30, 2024
3 checks passed
@ochen1 ochen1 deleted the patch-1 branch March 31, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants