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
a752db35
Commit
a752db35
authored
Jul 08, 2019
by
Paul
Browse files
Formatting
parent
cfdd207d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/simplify_algebra.cpp
src/simplify_algebra.cpp
+2
-5
test/simplify_algebra_test.cpp
test/simplify_algebra_test.cpp
+2
-1
No files found.
src/simplify_algebra.cpp
View file @
a752db35
...
@@ -10,10 +10,7 @@ namespace migraphx {
...
@@ -10,10 +10,7 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
auto
lit_broadcast
()
{
return
match
::
any_of
(
match
::
is_constant
(),
match
::
name
(
"broadcast"
));
}
auto
lit_broadcast
()
{
return
match
::
any_of
(
match
::
is_constant
(),
match
::
name
(
"broadcast"
));
}
auto
not_lit_broadcast
()
auto
not_lit_broadcast
()
{
return
match
::
none_of
(
match
::
is_constant
(),
match
::
name
(
"broadcast"
));
}
{
return
match
::
none_of
(
match
::
is_constant
(),
match
::
name
(
"broadcast"
));
}
auto
op_lit_broadcast
(
std
::
string
op
,
std
::
string
x
,
std
::
string
y
)
auto
op_lit_broadcast
(
std
::
string
op
,
std
::
string
x
,
std
::
string
y
)
{
{
return
match
::
name
(
op
)(
match
::
either_arg
(
0
,
1
)(
lit_broadcast
().
bind
(
std
::
move
(
x
)),
return
match
::
name
(
op
)(
match
::
either_arg
(
0
,
1
)(
lit_broadcast
().
bind
(
std
::
move
(
x
)),
...
...
test/simplify_algebra_test.cpp
View file @
a752db35
...
@@ -115,7 +115,8 @@ TEST_CASE(simplify_mul_conv1)
...
@@ -115,7 +115,8 @@ TEST_CASE(simplify_mul_conv1)
p
.
add_instruction
(
pass_op
{},
mul
);
p
.
add_instruction
(
pass_op
{},
mul
);
EXPECT
(
conv
->
outputs
().
front
()
->
name
()
==
"mul"
);
EXPECT
(
conv
->
outputs
().
front
()
->
name
()
==
"mul"
);
p
.
compile
(
simplify_algebra_target
{});
p
.
compile
(
simplify_algebra_target
{});
auto
new_conv
=
std
::
find_if
(
p
.
begin
(),
p
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"convolution"
;
});
auto
new_conv
=
std
::
find_if
(
p
.
begin
(),
p
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"convolution"
;
});
EXPECT
(
new_conv
->
outputs
().
front
()
->
name
()
!=
"mul"
);
EXPECT
(
new_conv
->
outputs
().
front
()
->
name
()
!=
"mul"
);
}
}
...
...
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