Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FastMoE
Commits
ac6a172d
Commit
ac6a172d
authored
Aug 17, 2024
by
zhanggzh
Browse files
change versio code
parent
60fb332b
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
setup.py
setup.py
+16
-3
No files found.
setup.py
View file @
ac6a172d
...
...
@@ -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'
,
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment