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
wangsen
paddle_dbnet
Commits
d4c0517f
Commit
d4c0517f
authored
Dec 02, 2021
by
ronny1996
Browse files
fix bug for rocm
parent
c81baca7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tools/infer/utility.py
tools/infer/utility.py
+4
-1
No files found.
tools/infer/utility.py
View file @
d4c0517f
...
...
@@ -311,7 +311,10 @@ def create_predictor(args, mode, logger):
def
get_infer_gpuid
():
cmd
=
"env | grep CUDA_VISIBLE_DEVICES"
if
not
paddle
.
fluid
.
core
.
is_compiled_with_rocm
():
cmd
=
"env | grep CUDA_VISIBLE_DEVICES"
else
:
cmd
=
"env | grep HIP_VISIBLE_DEVICES"
env_cuda
=
os
.
popen
(
cmd
).
readlines
()
if
len
(
env_cuda
)
==
0
:
return
0
...
...
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