update local version format (#909)

pull/912/head
ver217 2022-05-05 14:59:12 +08:00 committed by GitHub
parent 3b1f5f07ce
commit 150b1a7453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ def get_version():
with open('version.txt') as f:
version = f.read().strip()
if build_cuda_ext:
torch_version = ''.join(torch.__version__.split('.')[:2])
cuda_version = ''.join(get_cuda_bare_metal_version(CUDA_HOME)[1:])
torch_version = '.'.join(torch.__version__.split('.')[:2])
cuda_version = '.'.join(get_cuda_bare_metal_version(CUDA_HOME)[1:])
version += f'+torch{torch_version}cu{cuda_version}'
return version