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
789afa39
Commit
789afa39
authored
Apr 19, 2019
by
Shucai Xiao
Browse files
fix cppcheck errors
parent
5a0c8ca7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
+24
-21
src/quantization.cpp
src/quantization.cpp
+23
-20
src/targets/gpu/include/migraphx/gpu/convert.hpp
src/targets/gpu/include/migraphx/gpu/convert.hpp
+1
-1
No files found.
src/quantization.cpp
View file @
789afa39
...
@@ -88,8 +88,12 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
...
@@ -88,8 +88,12 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
}
}
}
}
if
(
inputs
!=
converted_inputs
)
// no change for the input, return directly
if
(
inputs
==
converted_inputs
)
{
{
return
;
}
auto
op
=
ins
->
get_operator
();
auto
op
=
ins
->
get_operator
();
auto
ins_shape
=
compute_shape
(
op
,
converted_inputs
);
auto
ins_shape
=
compute_shape
(
op
,
converted_inputs
);
if
(
ins_shape
.
type
()
!=
orig_type
)
if
(
ins_shape
.
type
()
!=
orig_type
)
...
@@ -114,7 +118,6 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
...
@@ -114,7 +118,6 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
prog
.
replace_instruction
(
ins
,
op
,
converted_inputs
);
prog
.
replace_instruction
(
ins
,
op
,
converted_inputs
);
}
}
}
}
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/targets/gpu/include/migraphx/gpu/convert.hpp
View file @
789afa39
...
@@ -17,7 +17,7 @@ struct hip_convert : unary_device<hip_convert, device::convert>
...
@@ -17,7 +17,7 @@ struct hip_convert : unary_device<hip_convert, device::convert>
op
::
convert
op
;
op
::
convert
op
;
hip_convert
(
const
op
::
convert
&
oper
)
:
op
(
oper
)
{}
hip_convert
(
const
op
::
convert
&
oper
)
:
op
(
oper
)
{}
hip_convert
(
const
op
::
convert
&&
oper
)
:
op
(
std
::
move
(
oper
)
)
{}
hip_convert
(
const
op
::
convert
&&
oper
)
:
op
(
oper
)
{}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
{
...
...
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