Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICV-mmengine_basecode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Schiffel
ICV-mmengine_basecode
Commits
29390688
Unverified
Commit
29390688
authored
2 years ago
by
Zaida Zhou
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Feats]: Add ROCm info when collecting env (#633)
* Add ROCm info when collecting env * minor fix
parent
06e077d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mmengine/utils/dl_utils/collect_env.py
+21
-9
21 additions, 9 deletions
mmengine/utils/dl_utils/collect_env.py
with
21 additions
and
9 deletions
mmengine/utils/dl_utils/collect_env.py
+
21
−
9
View file @
29390688
...
@@ -67,15 +67,27 @@ def collect_env():
...
@@ -67,15 +67,27 @@ def collect_env():
env_info
[
'
CUDA_HOME
'
]
=
CUDA_HOME
env_info
[
'
CUDA_HOME
'
]
=
CUDA_HOME
if
CUDA_HOME
is
not
None
and
osp
.
isdir
(
CUDA_HOME
):
if
CUDA_HOME
is
not
None
and
osp
.
isdir
(
CUDA_HOME
):
try
:
if
CUDA_HOME
==
'
/opt/rocm
'
:
nvcc
=
osp
.
join
(
CUDA_HOME
,
'
bin/nvcc
'
)
try
:
nvcc
=
subprocess
.
check_output
(
f
'"
{
nvcc
}
"
-V
'
,
shell
=
True
)
nvcc
=
osp
.
join
(
CUDA_HOME
,
'
hip/bin/hipcc
'
)
nvcc
=
nvcc
.
decode
(
'
utf-8
'
).
strip
()
nvcc
=
subprocess
.
check_output
(
release
=
nvcc
.
rfind
(
'
Cuda compilation tools
'
)
f
'"
{
nvcc
}
"
--version
'
,
shell
=
True
)
build
=
nvcc
.
rfind
(
'
Build
'
)
nvcc
=
nvcc
.
decode
(
'
utf-8
'
).
strip
()
nvcc
=
nvcc
[
release
:
build
].
strip
()
release
=
nvcc
.
rfind
(
'
HIP version:
'
)
except
subprocess
.
SubprocessError
:
build
=
nvcc
.
rfind
(
''
)
nvcc
=
'
Not Available
'
nvcc
=
nvcc
[
release
:
build
].
strip
()
except
subprocess
.
SubprocessError
:
nvcc
=
'
Not Available
'
else
:
try
:
nvcc
=
osp
.
join
(
CUDA_HOME
,
'
bin/nvcc
'
)
nvcc
=
subprocess
.
check_output
(
f
'"
{
nvcc
}
"
-V
'
,
shell
=
True
)
nvcc
=
nvcc
.
decode
(
'
utf-8
'
).
strip
()
release
=
nvcc
.
rfind
(
'
Cuda compilation tools
'
)
build
=
nvcc
.
rfind
(
'
Build
'
)
nvcc
=
nvcc
[
release
:
build
].
strip
()
except
subprocess
.
SubprocessError
:
nvcc
=
'
Not Available
'
env_info
[
'
NVCC
'
]
=
nvcc
env_info
[
'
NVCC
'
]
=
nvcc
try
:
try
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment