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
You need to sign in or sign up before continuing.
Commit
863c03f2
authored
Aug 21, 2024
by
zhanggezhong
Browse files
Update setup.py
parent
7e12e0ed
Changes
1
Show 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():
...
@@ -139,27 +139,17 @@ def get_abi():
except
Exception
:
except
Exception
:
return
'abiUnknown'
return
'abiUnknown'
dcu_version
=
__version__
dcu_version
=
__version__
dcu_version
+=
'+das1.1'
dcu_version
+=
'+das'
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
()
if
os
.
getenv
(
"ROCM_PATH"
):
if
os
.
getenv
(
"ROCM_PATH"
):
rocm_path
=
os
.
getenv
(
'ROCM_PATH'
,
""
)
rocm_path
=
os
.
getenv
(
'ROCM_PATH'
,
""
)
rocm_version_path
=
os
.
path
.
join
(
rocm_path
,
'.info'
,
"rocm_version"
)
rocm_version_path
=
os
.
path
.
join
(
rocm_path
,
'.info'
,
"rocm_version"
)
with
open
(
rocm_version_path
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
with
open
(
rocm_version_path
,
'r'
)
as
file
:
lines
=
file
.
readlines
()
content
=
file
.
read
().
strip
()
rocm_version
=
lines
[
0
][:
-
2
].
replace
(
"."
,
""
)
dtk_version
=
content
.
replace
(
'.'
,
''
)
dcu_version
+=
".dtk"
+
rocm_version
# torch version
dcu_version
+=
".dtk"
+
dtk_version
import
torch
dcu_version
+=
".torch"
+
torch
.
__version__
[:]
def
write_version_file
():
def
write_version_file
():
cwd
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
cwd
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
version_path
=
os
.
path
.
join
(
cwd
,
"pytorch3d"
,
"__init__.py"
)
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