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
301b7605
Commit
301b7605
authored
Jan 14, 2019
by
Paul
Browse files
Formatting
parent
e32bbb45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/simplify_reshapes.cpp
src/simplify_reshapes.cpp
+0
-1
test/simplify_reshapes_test.cpp
test/simplify_reshapes_test.cpp
+3
-3
No files found.
src/simplify_reshapes.cpp
View file @
301b7605
...
...
@@ -33,7 +33,6 @@ bool is_reshaper(instruction_ref ins)
return
contains
(
names
,
ins
->
name
())
and
not
is_nonstandard_reshaper
(
ins
);
}
void
simplify_reshapes
::
apply
(
program
&
p
)
const
{
for
(
auto
ins
:
iterator_for
(
p
))
...
...
test/simplify_reshapes_test.cpp
View file @
301b7605
...
...
@@ -120,10 +120,10 @@ TEST_CASE(single_transpose_sin_pass)
TEST_CASE
(
reshape_transpose
)
{
migraphx
::
program
p
;
auto
s
=
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
112
,
56
,
56
}};
auto
x
=
p
.
add_parameter
(
"x"
,
s
);
auto
s
=
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
112
,
56
,
56
}};
auto
x
=
p
.
add_parameter
(
"x"
,
s
);
auto
r1
=
p
.
add_instruction
(
migraphx
::
op
::
reshape
{{
1
,
4
,
28
,
56
,
56
}},
x
);
auto
t
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
0
,
2
,
1
,
3
,
4
}},
r1
);
auto
t
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
0
,
2
,
1
,
3
,
4
}},
r1
);
auto
ct
=
p
.
add_instruction
(
migraphx
::
op
::
contiguous
{},
t
);
auto
r2
=
p
.
add_instruction
(
migraphx
::
op
::
reshape
{{
1
,
112
,
56
,
56
}},
ct
);
p
.
add_instruction
(
pass_op
{},
r2
);
...
...
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