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
f8b48b78
Commit
f8b48b78
authored
Mar 15, 2019
by
Paul
Browse files
Formatting
parent
658a32ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
test/fwd_conv_batchnorm_rewrite_test.cpp
test/fwd_conv_batchnorm_rewrite_test.cpp
+4
-12
No files found.
test/fwd_conv_batchnorm_rewrite_test.cpp
View file @
f8b48b78
...
@@ -8,10 +8,7 @@
...
@@ -8,10 +8,7 @@
#include <test.hpp>
#include <test.hpp>
#include <migraphx/verify.hpp>
#include <migraphx/verify.hpp>
bool
is_batch_norm
(
migraphx
::
instruction
&
ins
)
bool
is_batch_norm
(
migraphx
::
instruction
&
ins
)
{
return
ins
.
name
()
==
"batch_norm_inference"
;
}
{
return
ins
.
name
()
==
"batch_norm_inference"
;
}
TEST_CASE
(
fwd_conv_batchnorm_rewrite_test
)
TEST_CASE
(
fwd_conv_batchnorm_rewrite_test
)
{
{
...
@@ -132,9 +129,7 @@ TEST_CASE(as_literal)
...
@@ -132,9 +129,7 @@ TEST_CASE(as_literal)
auto
result1
=
p1
.
eval
({});
auto
result1
=
p1
.
eval
({});
auto
result2
=
p2
.
eval
({});
auto
result2
=
p2
.
eval
({});
visit_all
(
result1
,
result2
)([
&
](
auto
r1
,
auto
r2
)
{
visit_all
(
result1
,
result2
)([
&
](
auto
r1
,
auto
r2
)
{
EXPECT
(
migraphx
::
verify_range
(
r1
,
r2
));
});
EXPECT
(
migraphx
::
verify_range
(
r1
,
r2
));
});
}
}
TEST_CASE
(
literal_reshape
)
TEST_CASE
(
literal_reshape
)
...
@@ -145,7 +140,7 @@ TEST_CASE(literal_reshape)
...
@@ -145,7 +140,7 @@ TEST_CASE(literal_reshape)
auto
create_program
=
[
&
]()
{
auto
create_program
=
[
&
]()
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
reshape
=
[
&
](
auto
ins
){
auto
reshape
=
[
&
](
auto
ins
)
{
return
p
.
add_instruction
(
migraphx
::
op
::
reshape
{{
1
,
4
,
1
,
1
}},
ins
);
return
p
.
add_instruction
(
migraphx
::
op
::
reshape
{{
1
,
4
,
1
,
1
}},
ins
);
};
};
...
@@ -160,7 +155,6 @@ TEST_CASE(literal_reshape)
...
@@ -160,7 +155,6 @@ TEST_CASE(literal_reshape)
return
p
;
return
p
;
};
};
migraphx
::
program
p1
=
create_program
();
migraphx
::
program
p1
=
create_program
();
migraphx
::
program
p2
=
create_program
();
migraphx
::
program
p2
=
create_program
();
migraphx
::
fwd_conv_batchnorm_rewrite
opt
;
migraphx
::
fwd_conv_batchnorm_rewrite
opt
;
...
@@ -173,9 +167,7 @@ TEST_CASE(literal_reshape)
...
@@ -173,9 +167,7 @@ TEST_CASE(literal_reshape)
auto
result1
=
p1
.
eval
({});
auto
result1
=
p1
.
eval
({});
auto
result2
=
p2
.
eval
({});
auto
result2
=
p2
.
eval
({});
visit_all
(
result1
,
result2
)([
&
](
auto
r1
,
auto
r2
)
{
visit_all
(
result1
,
result2
)([
&
](
auto
r1
,
auto
r2
)
{
EXPECT
(
migraphx
::
verify_range
(
r1
,
r2
));
});
EXPECT
(
migraphx
::
verify_range
(
r1
,
r2
));
});
}
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
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