Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
deepinfer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangxue
deepinfer
Commits
e9731c3a
Commit
e9731c3a
authored
Mar 05, 2024
by
xin.wang.waytous
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
int8-support-
parent
a4fe9ff5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
trt_infer.cpp
src/libs/inferences/tensorrt/trt_infer.cpp
+4
-1
trt_yolov5_infer.cpp
src/libs/inferences/tensorrt/trt_yolov5_infer.cpp
+4
-0
No files found.
src/libs/inferences/tensorrt/trt_infer.cpp
View file @
e9731c3a
...
...
@@ -190,8 +190,11 @@ bool TRTInference::BuildEngine(YAML::Node& configNode){
configNode
[
"inputWidth"
].
as
<
int
>
(),
configNode
[
"inputHeight"
].
as
<
int
>
(),
inputMean
,
inputStd
,
configNode
[
"useBGR"
].
as
<
bool
>
(),
configNode
[
"fixAspectRatio"
].
as
<
bool
>
()
);
// builder->setInt8Calibrator(calibrator);
#ifdef TRT_8
builderConfig
->
setInt8Calibrator
(
calibrator
);
#else
builder
->
setInt8Calibrator
(
calibrator
);
#endif
}
else
{
LOG_ERROR
<<
"Not imgs for calib int8. "
<<
configNode
[
"calibImgPathFile"
].
as
<
std
::
string
>
();
...
...
src/libs/inferences/tensorrt/trt_yolov5_infer.cpp
View file @
e9731c3a
...
...
@@ -372,7 +372,11 @@ bool YoloV5TRTInference::BuildEngine(YAML::Node& configNode){
configNode
[
"calibTableCache"
].
as
<
std
::
string
>
(),
maxBatchSize
,
inputWidth
,
inputHeight
,
inputMean
,
inputStd
,
configNode
[
"useBGR"
].
as
<
bool
>
(),
configNode
[
"fixAspectRatio"
].
as
<
bool
>
());
#ifdef TRT_8
config
->
setInt8Calibrator
(
calibrator
);
#else
builder
->
setInt8Calibrator
(
calibrator
);
#endif
// */
// return false;
}
...
...
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