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
pytorch3d
Commits
863c03f2
Commit
863c03f2
authored
Aug 21, 2024
by
zhanggezhong
Browse files
Update setup.py
parent
7e12e0ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
setup.py
setup.py
+8
-18
No files found.
setup.py
View file @
863c03f2
...
...
@@ -139,27 +139,17 @@ def get_abi():
except
Exception
:
return
'abiUnknown'
dcu_version
=
__version__
dcu_version
+=
'+das1.1'
sha
=
"Unknown"
cwd
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
try
:
sha
=
subprocess
.
check_output
([
"git"
,
"rev-parse"
,
"HEAD"
],
cwd
=
cwd
).
decode
(
"ascii"
).
strip
()
except
Exception
:
pass
if
sha
!=
'Unknown'
:
dcu_version
+=
'.git'
+
sha
[:
7
]
dcu_version
+=
"."
+
get_abi
()
dcu_version
+=
'+das'
if
os
.
getenv
(
"ROCM_PATH"
):
rocm_path
=
os
.
getenv
(
'ROCM_PATH'
,
""
)
rocm_version_path
=
os
.
path
.
join
(
rocm_path
,
'.info'
,
"rocm_version"
)
with
open
(
rocm_version_path
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
lines
=
file
.
readlines
()
rocm_version
=
lines
[
0
][:
-
2
].
replace
(
"."
,
""
)
dcu_version
+=
".dtk"
+
rocm_version
# torch version
import
torch
dcu_version
+=
".torch"
+
torch
.
__version__
[:]
with
open
(
rocm_version_path
,
'r'
)
as
file
:
content
=
file
.
read
().
strip
()
dtk_version
=
content
.
replace
(
'.'
,
''
)
dcu_version
+=
".dtk"
+
dtk_version
def
write_version_file
():
cwd
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
version_path
=
os
.
path
.
join
(
cwd
,
"pytorch3d"
,
"__init__.py"
)
...
...
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