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
b789b70c
Commit
b789b70c
authored
Dec 27, 2021
by
WenmuZhou
Browse files
add system judge
parent
e9555900
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
tools/infer/utility.py
tools/infer/utility.py
+5
-0
No files found.
tools/infer/utility.py
View file @
b789b70c
...
...
@@ -15,6 +15,7 @@
import
argparse
import
os
import
sys
import
platform
import
cv2
import
numpy
as
np
import
paddle
...
...
@@ -313,6 +314,10 @@ def create_predictor(args, mode, logger):
def
get_infer_gpuid
():
sysstr
=
platform
.
system
()
if
sysstr
==
"Windows"
:
return
0
if
not
paddle
.
fluid
.
core
.
is_compiled_with_rocm
():
cmd
=
"env | grep CUDA_VISIBLE_DEVICES"
else
:
...
...
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