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
25b4da98
Unverified
Commit
25b4da98
authored
Nov 25, 2021
by
Double_V
Committed by
GitHub
Nov 25, 2021
Browse files
Merge pull request #4752 from LDOUBLEV/dygraph
fix TRT core error and get gpu id function
parents
2e9abcb9
4fb9b76f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
tools/infer/utility.py
tools/infer/utility.py
+1
-4
No files found.
tools/infer/utility.py
100755 → 100644
View file @
25b4da98
...
...
@@ -190,6 +190,7 @@ def create_predictor(args, mode, logger):
config
.
enable_use_gpu
(
args
.
gpu_mem
,
0
)
if
args
.
use_tensorrt
:
config
.
enable_tensorrt_engine
(
workspace_size
=
1
<<
30
,
precision_mode
=
precision
,
max_batch_size
=
args
.
max_batch_size
,
min_subgraph_size
=
args
.
min_subgraph_size
)
...
...
@@ -310,10 +311,6 @@ def create_predictor(args, mode, logger):
def
get_infer_gpuid
():
cmd
=
"nvidia-smi"
res
=
os
.
popen
(
cmd
).
readlines
()
if
len
(
res
)
==
0
:
return
None
cmd
=
"env | grep CUDA_VISIBLE_DEVICES"
env_cuda
=
os
.
popen
(
cmd
).
readlines
()
if
len
(
env_cuda
)
==
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