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
f5b9f783
Commit
f5b9f783
authored
Mar 11, 2019
by
Khalique
Browse files
replace pad with identity when no paddings specified
parent
154f21f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+5
-0
No files found.
src/onnx/onnx.cpp
View file @
f5b9f783
...
@@ -638,6 +638,11 @@ struct onnx_parser
...
@@ -638,6 +638,11 @@ struct onnx_parser
auto
&&
pad_vals
=
attributes
[
"pads"
].
ints
();
auto
&&
pad_vals
=
attributes
[
"pads"
].
ints
();
pads
=
std
::
vector
<
int64_t
>
(
pad_vals
.
begin
(),
pad_vals
.
end
());
pads
=
std
::
vector
<
int64_t
>
(
pad_vals
.
begin
(),
pad_vals
.
end
());
}
}
// check if padding is actually being done (at least one value is nonzero)
if
(
std
::
all_of
(
pads
.
begin
(),
pads
.
end
(),
[](
const
int
&
i
){
return
i
==
0
;}))
{
return
prog
.
add_instruction
(
migraphx
::
op
::
identity
{},
args
.
front
());
}
if
(
contains
(
attributes
,
"value"
))
if
(
contains
(
attributes
,
"value"
))
{
{
value
=
parse_value
(
attributes
.
at
(
"value"
)).
at
<
float
>
();
value
=
parse_value
(
attributes
.
at
(
"value"
)).
at
<
float
>
();
...
...
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