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
79ecf695
Commit
79ecf695
authored
Jul 05, 2019
by
Shucai Xiao
Browse files
fix cppcheck error
parent
bb0c1e36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+3
-3
No files found.
src/onnx/onnx.cpp
View file @
79ecf695
...
@@ -930,7 +930,7 @@ struct onnx_parser
...
@@ -930,7 +930,7 @@ struct onnx_parser
// input is empty, output is a scalar
// input is empty, output is a scalar
auto
type
=
l_val
.
get_shape
().
type
();
auto
type
=
l_val
.
get_shape
().
type
();
if
(
args
.
size
()
==
0
)
if
(
args
.
empty
()
)
{
{
MIGRAPHX_THROW
(
"Parse ConstantOfShape : must have 1 input!"
);
MIGRAPHX_THROW
(
"Parse ConstantOfShape : must have 1 input!"
);
}
}
...
@@ -968,7 +968,7 @@ struct onnx_parser
...
@@ -968,7 +968,7 @@ struct onnx_parser
}
}
instruction_ref
instruction_ref
parse_expand
(
const
std
::
string
&
,
attribute_map
,
std
::
vector
<
instruction_ref
>
args
)
parse_expand
(
const
std
::
string
&
,
const
attribute_map
,
std
::
vector
<
instruction_ref
>
args
)
{
{
auto
in_lens
=
args
[
0
]
->
get_shape
().
lens
();
auto
in_lens
=
args
[
0
]
->
get_shape
().
lens
();
migraphx
::
argument
arg_s
=
args
[
1
]
->
eval
();
migraphx
::
argument
arg_s
=
args
[
1
]
->
eval
();
...
@@ -980,7 +980,7 @@ struct onnx_parser
...
@@ -980,7 +980,7 @@ struct onnx_parser
arg_s
.
visit
([
&
](
auto
input
)
{
dims
.
assign
(
input
.
begin
(),
input
.
end
());
});
arg_s
.
visit
([
&
](
auto
input
)
{
dims
.
assign
(
input
.
begin
(),
input
.
end
());
});
auto
out_lens
=
compute_broadcasted_lens
(
in_lens
,
dims
);
auto
out_lens
=
compute_broadcasted_lens
(
in_lens
,
dims
);
return
prog
.
add_instruction
(
op
::
multibroadcast
{
out_lens
},
std
::
move
(
args
[
0
])
)
;
return
prog
.
add_instruction
(
op
::
multibroadcast
{
out_lens
},
args
[
0
]);
}
}
std
::
vector
<
instruction_ref
>
std
::
vector
<
instruction_ref
>
...
...
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