[setup] add local version label (#890)

pull/895/head
ver217 3 years ago committed by GitHub
parent 1d0aba4153
commit daf59ff72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -94,7 +94,12 @@ def fetch_readme():
def get_version(): def get_version():
with open('version.txt') as f: with open('version.txt') as f:
return f.read().strip() 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:])
version += f'+torch{torch_version}cu{cuda_version}'
return version
if build_cuda_ext: if build_cuda_ext:

Loading…
Cancel
Save