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
ColossalAI
Commits
fba08743
Unverified
Commit
fba08743
authored
Feb 06, 2023
by
Frank Lee
Committed by
GitHub
Feb 06, 2023
Browse files
[setup] fixed inconsistent version meta (#2578)
parent
8af5a079
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
setup.py
setup.py
+16
-4
No files found.
setup.py
View file @
fba08743
...
...
@@ -117,14 +117,26 @@ def get_version():
with
open
(
version_txt_path
)
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
:])
version
+=
f
'+torch
{
torch_version
}
cu
{
cuda_version
}
'
# write version into version.py
with
open
(
version_py_path
,
'w'
)
as
f
:
f
.
write
(
f
"__version__ = '
{
version
}
'
\n
"
)
if
build_cuda_ext
:
torch_version
=
'.'
.
join
(
torch
.
__version__
.
split
(
'.'
)[:
2
])
cuda_version
=
'.'
.
join
(
get_cuda_bare_metal_version
(
CUDA_HOME
)[
1
:])
else
:
torch_version
=
None
cuda_version
=
None
if
torch_version
:
f
.
write
(
f
'torch = "
{
torch_version
}
"
\n
'
)
else
:
f
.
write
(
'torch = None
\n
'
)
if
cuda_version
:
f
.
write
(
f
'cuda = "
{
cuda_version
}
"
\n
'
)
else
:
f
.
write
(
'cuda = None
\n
'
)
return
version
...
...
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