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
5564172e
Commit
5564172e
authored
May 16, 2021
by
Shucai Xiao
Browse files
clang format
parent
78c3f579
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
test/verify/test_conv_bn_add.cpp
test/verify/test_conv_bn_add.cpp
+14
-11
No files found.
test/verify/test_conv_bn_add.cpp
View file @
5564172e
...
@@ -16,7 +16,8 @@ struct test_conv_bn_add : verify_program<test_conv_bn_add>
...
@@ -16,7 +16,8 @@ struct test_conv_bn_add : verify_program<test_conv_bn_add>
auto
bias
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
2
+
seed
)));
auto
bias
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
2
+
seed
)));
auto
mean
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
3
+
seed
)));
auto
mean
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
3
+
seed
)));
auto
variance
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
4
+
seed
)));
auto
variance
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
4
+
seed
)));
return
mm
->
add_instruction
(
migraphx
::
make_op
(
"batch_norm_inference"
),
x
,
scale
,
bias
,
mean
,
variance
);
return
mm
->
add_instruction
(
migraphx
::
make_op
(
"batch_norm_inference"
),
x
,
scale
,
bias
,
mean
,
variance
);
}
}
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
...
@@ -26,9 +27,11 @@ struct test_conv_bn_add : verify_program<test_conv_bn_add>
...
@@ -26,9 +27,11 @@ struct test_conv_bn_add : verify_program<test_conv_bn_add>
std
::
size_t
ochannels
=
256
;
std
::
size_t
ochannels
=
256
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
auto
x
=
mm
->
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
ichannels
,
56
,
56
}});
auto
x
=
mm
->
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
ichannels
,
56
,
56
}});
auto
w
=
mm
->
add_literal
(
migraphx
::
generate_literal
({
migraphx
::
shape
::
float_type
,
{
ochannels
,
ichannels
,
1
,
1
}},
1
));
auto
w
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
{
migraphx
::
shape
::
float_type
,
{
ochannels
,
ichannels
,
1
,
1
}},
1
));
auto
y
=
mm
->
add_parameter
(
"y"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
ichannels
,
56
,
56
}});
auto
y
=
mm
->
add_parameter
(
"y"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
ichannels
,
56
,
56
}});
auto
v
=
mm
->
add_literal
(
migraphx
::
generate_literal
({
migraphx
::
shape
::
float_type
,
{
ochannels
,
ichannels
,
1
,
1
}},
2
));
auto
v
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
{
migraphx
::
shape
::
float_type
,
{
ochannels
,
ichannels
,
1
,
1
}},
2
));
auto
relu1
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x
);
auto
relu1
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x
);
auto
conv1
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
relu1
,
w
);
auto
conv1
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
relu1
,
w
);
auto
bn1
=
add_bn
(
mm
,
conv1
,
ochannels
,
1
);
auto
bn1
=
add_bn
(
mm
,
conv1
,
ochannels
,
1
);
...
...
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