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
1e1fa62e
Commit
1e1fa62e
authored
Mar 28, 2019
by
Khalique
Browse files
formatting
parent
faddc14e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
src/eliminate_pad.cpp
src/eliminate_pad.cpp
+3
-3
src/include/migraphx/eliminate_pad.hpp
src/include/migraphx/eliminate_pad.hpp
+1
-1
src/include/migraphx/operators.hpp
src/include/migraphx/operators.hpp
+2
-1
No files found.
src/eliminate_pad.cpp
View file @
1e1fa62e
...
...
@@ -29,9 +29,9 @@ void eliminate_pad::apply(program& p) const
template
<
class
T
>
void
eliminate_pad
::
update_op
(
T
,
const
instruction_ref
&
input
,
const
instruction_ref
&
ins
,
program
&
p
)
const
const
instruction_ref
&
input
,
const
instruction_ref
&
ins
,
program
&
p
)
const
{
auto
pad_op
=
any_cast
<
op
::
pad
>
(
input
->
get_operator
());
if
(
!
pad_op
.
symmetric
())
...
...
src/include/migraphx/eliminate_pad.hpp
View file @
1e1fa62e
...
...
@@ -13,7 +13,7 @@ inline namespace MIGRAPHX_INLINE_NS {
struct
program
;
/**
* Remove pads if they can be written as an
* Remove pads if they can be written as an
* attribute to another op (im2col, convolution, pooling)
*/
struct
eliminate_pad
...
...
src/include/migraphx/operators.hpp
View file @
1e1fa62e
...
...
@@ -718,7 +718,8 @@ struct pad
bool
symmetric
()
const
{
std
::
size_t
num_dims
=
pads
.
size
()
/
2
;
return
std
::
equal
(
pads
.
begin
(),
pads
.
begin
()
+
num_dims
,
pads
.
begin
()
+
num_dims
,
pads
.
end
());
return
std
::
equal
(
pads
.
begin
(),
pads
.
begin
()
+
num_dims
,
pads
.
begin
()
+
num_dims
,
pads
.
end
());
}
};
...
...
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