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
gaoqiong
MIGraphX
Commits
957cbe24
Commit
957cbe24
authored
Sep 01, 2019
by
Shucai Xiao
Browse files
fix a cppcheck error
parent
dbf9eab6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/quantization.cpp
src/quantization.cpp
+9
-1
No files found.
src/quantization.cpp
View file @
957cbe24
...
...
@@ -509,7 +509,15 @@ capture_arguments_impl(program& prog, const target& t, const std::vector<std::st
auto
max_abs
=
std
::
max
(
std
::
fabs
(
max_val
),
std
::
fabs
(
min_val
));
max_abs_vals
->
at
(
ins_index
)
=
std
::
max
(
max_abs_vals
->
at
(
ins_index
),
max_abs
);
param_pair
.
first
=
127.0
f
/
max_abs_vals
->
at
(
ins_index
);
// if all values are 0, no need to do scaling
if
(
max_abs_vals
->
at
(
ins_index
)
==
0.0
f
)
{
param_pair
.
first
=
1.0
f
;
}
else
{
param_pair
.
first
=
127.0
f
/
max_abs_vals
->
at
(
ins_index
);
}
int8_quant_params
->
at
(
ins_index
)
=
param_pair
;
};
...
...
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