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
3c100748
Commit
3c100748
authored
Nov 02, 2022
by
Khalique Ahmed
Browse files
formatting
parent
01753a1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
test/layout_nhwc.cpp
test/layout_nhwc.cpp
+9
-18
No files found.
test/layout_nhwc.cpp
View file @
3c100748
...
@@ -129,16 +129,10 @@ TEST_CASE(conv_conv)
...
@@ -129,16 +129,10 @@ TEST_CASE(conv_conv)
migraphx
::
module
m1
;
migraphx
::
module
m1
;
{
{
auto
x
=
m1
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
8
,
16
,
16
}});
auto
x
=
m1
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
8
,
16
,
16
}});
auto
w
=
m1
.
add_literal
(
auto
w
=
migraphx
::
generate_literal
({
migraphx
::
shape
::
float_type
,
{
8
,
8
,
1
,
1
}}));
m1
.
add_literal
(
migraphx
::
generate_literal
({
migraphx
::
shape
::
float_type
,
{
8
,
8
,
1
,
1
}}));
auto
conv1
=
m1
.
add_instruction
(
auto
conv1
=
m1
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
x
,
w
);
migraphx
::
make_op
(
"convolution"
),
m1
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
conv1
,
w
);
x
,
w
);
m1
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
conv1
,
w
);
}
}
run_pass
(
m1
);
run_pass
(
m1
);
...
@@ -147,13 +141,10 @@ TEST_CASE(conv_conv)
...
@@ -147,13 +141,10 @@ TEST_CASE(conv_conv)
auto
x
=
add_layout_nhwc
(
auto
x
=
add_layout_nhwc
(
m2
,
m2
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
8
,
16
,
16
}}));
m2
,
m2
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
8
,
16
,
16
}}));
auto
w
=
auto
w
=
m2
.
add_literal
(
migraphx
::
generate_literal
(
m2
.
add_literal
(
migraphx
::
generate_literal
({
migraphx
::
shape
::
float_type
,
{
8
,
8
,
1
,
1
}}));
{
migraphx
::
shape
::
float_type
,
{
8
,
8
,
1
,
1
}}));
auto
conv
=
m2
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
x
,
add_layout_nhwc
(
m2
,
w
));
auto
conv
=
m2
.
add_instruction
(
auto
conv_layout
=
migraphx
::
make_op
(
"convolution"
),
m2
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
conv
,
add_layout_nhwc
(
m2
,
w
));
x
,
add_layout_nhwc
(
m2
,
w
));
auto
conv_layout
=
m2
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
conv
,
add_layout_nhwc
(
m2
,
w
));
m2
.
add_instruction
(
layout
(),
conv_layout
);
m2
.
add_instruction
(
layout
(),
conv_layout
);
}
}
EXPECT
(
m1
.
sort
()
==
m2
.
sort
());
EXPECT
(
m1
.
sort
()
==
m2
.
sort
());
...
...
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