Skip to content

Commit

Permalink
add torch version to the whl name (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-ningxin authored Jul 22, 2024
1 parent 937bc18 commit 532ad84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gen_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import shutil
import re
from typing import Optional, Tuple
import torch

CUR_DIR = os.path.dirname(os.path.realpath(__file__))

Expand Down Expand Up @@ -83,7 +84,9 @@ def get_flux_version(version_txt, *, dev=False):
version = f.readline()
version = version.strip()
cuda_version_major, cuda_version_minor = cuda_version()
version = version + f"+cu{cuda_version_major}{cuda_version_minor}"
torch_version_splits = torch.__version__.split(".")
torch_version = f"{torch_version_splits[0]}.{torch_version_splits[1]}"
version = version + f"+cu{cuda_version_major}{cuda_version_minor}" + f"torch{torch_version}"
if dev:
commit_id = get_git_commit(CUR_DIR)

Expand Down

0 comments on commit 532ad84

Please sign in to comment.