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
d0c85ddc
"docs/vscode:/vscode.git/clone" did not exist on "8ef1ee812d44fc697005f154a43cc8048673a89c"
Unverified
Commit
d0c85ddc
authored
Dec 27, 2021
by
zhoujun
Committed by
GitHub
Dec 27, 2021
Browse files
Merge pull request #5075 from WenmuZhou/shijiang
add system judge
parents
3906c9cd
b789b70c
Changes
1
Hide 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 @
d0c85ddc
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
import
argparse
import
argparse
import
os
import
os
import
sys
import
sys
import
platform
import
cv2
import
cv2
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
...
@@ -313,6 +314,10 @@ def create_predictor(args, mode, logger):
...
@@ -313,6 +314,10 @@ def create_predictor(args, mode, logger):
def
get_infer_gpuid
():
def
get_infer_gpuid
():
sysstr
=
platform
.
system
()
if
sysstr
==
"Windows"
:
return
0
if
not
paddle
.
fluid
.
core
.
is_compiled_with_rocm
():
if
not
paddle
.
fluid
.
core
.
is_compiled_with_rocm
():
cmd
=
"env | grep CUDA_VISIBLE_DEVICES"
cmd
=
"env | grep CUDA_VISIBLE_DEVICES"
else
:
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