Commit ac6a172d authored by zhanggzh's avatar zhanggzh
Browse files

change versio code

parent 60fb332b
......@@ -3,7 +3,7 @@ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os
import torch
from fastpt import CUDAExtension
import get_dcu_version
#import get_dcu_version
cxx_flags = []
ext_libs = []
......@@ -41,11 +41,24 @@ else:
def get_package_version():
__version__ = '1.1.0'
return __version__
ROCM_PATH = os.getenv('ROCM_PATH')
dtk_path = ROCM_PATH + '/.info/rocm_version'
with open(dtk_path, 'r') as file:
content = file.read().strip()
dtk_version = content.replace('.', '')
print(dtk_version)
cwd = os.path.dirname(os.path.abspath(__file__))
ver_path = os.path.join(cwd, "fmoe", "__init__.py")
with open(ver_path, 'w') as f:
f.write("__version__ = '1.2.0'\n")
#with open(version_path, "w") as f:
# f.write(f"__dcu_version__ = '{version}'\n")
# f.write(f"__dcu_version__ = '1.2.0+das.dtk{dtk_version}'\n")
def write_version_file():
cwd = os.path.dirname(os.path.abspath(__file__))
version_path = os.path.join(cwd, "fmoe", "version.py")
version = get_dcu_version.dcu_version()
version = dtk_version
with open(version_path, "w") as f:
f.write(f"__dcu_version__ = '{version}'\n")
write_version_file()
......@@ -54,7 +67,7 @@ if __name__ == '__main__':
setuptools.setup(
name='fastmoe',
#version='1.1.0',
version = get_package_version() + get_dcu_version.moe_whl_name(),
version = '1.1.0' + '.das.' + dtk_version,
description='An efficient Mixture-of-Experts system for PyTorch',
author=', '.join(authors),
author_email='hja20@mails.tsinghua.edu.cn',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment