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
c9a533d4
Commit
c9a533d4
authored
Aug 14, 2023
by
Khalique Ahmed
Browse files
formatting
parent
30c8ff61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/eliminate_layout.cpp
src/eliminate_layout.cpp
+1
-2
test/op_shape_test.cpp
test/op_shape_test.cpp
+3
-3
No files found.
src/eliminate_layout.cpp
View file @
c9a533d4
...
@@ -139,8 +139,7 @@ void remove_layout(module& m, const std::unordered_set<instruction_ref>& output_
...
@@ -139,8 +139,7 @@ void remove_layout(module& m, const std::unordered_set<instruction_ref>& output_
void
eliminate_layout
::
apply
(
module_pass_manager
&
mpm
)
const
void
eliminate_layout
::
apply
(
module_pass_manager
&
mpm
)
const
{
{
std
::
unordered_set
<
instruction_ref
>
output_layouts
=
std
::
unordered_set
<
instruction_ref
>
output_layouts
=
preserve_output_layout
(
mpm
.
get_module
());
preserve_output_layout
(
mpm
.
get_module
());
remove_layout
(
mpm
.
get_module
(),
output_layouts
);
remove_layout
(
mpm
.
get_module
(),
output_layouts
);
// find_convs(mpm.get_module()));
// find_convs(mpm.get_module()));
// remove_layout(mpm.get_module());
// remove_layout(mpm.get_module());
...
...
test/op_shape_test.cpp
View file @
c9a533d4
...
@@ -323,7 +323,7 @@ TEST_CASE(conv_dyn_batch)
...
@@ -323,7 +323,7 @@ TEST_CASE(conv_dyn_batch)
TEST_CASE
(
conv_dyn_img
)
TEST_CASE
(
conv_dyn_img
)
{
{
migraphx
::
shape
input_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
migraphx
::
shape
input_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
{{
1
,
1
},
{
3
,
3
},
{
5
,
20
},
{
5
,
20
}}};
{{
1
,
1
},
{
3
,
3
},
{
5
,
20
},
{
5
,
20
}}};
migraphx
::
shape
weights_shape
=
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
3
,
3
}};
migraphx
::
shape
weights_shape
=
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
3
,
3
}};
migraphx
::
shape
output_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
migraphx
::
shape
output_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
{{
1
,
1
},
{
1
,
1
},
{
3
,
18
},
{
3
,
18
}}};
{{
1
,
1
},
{
1
,
1
},
{
3
,
18
},
{
3
,
18
}}};
...
@@ -376,7 +376,7 @@ TEST_CASE(conv_autopad_dyn_batch)
...
@@ -376,7 +376,7 @@ TEST_CASE(conv_autopad_dyn_batch)
{
{
// auto_pad dynamic batch
// auto_pad dynamic batch
migraphx
::
shape
input_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
migraphx
::
shape
input_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
{{
1
,
10
},
{
3
,
3
},
{
5
,
5
},
{
5
,
5
}}};
{{
1
,
10
},
{
3
,
3
},
{
5
,
5
},
{
5
,
5
}}};
migraphx
::
shape
weights_shape
=
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
3
,
3
}};
migraphx
::
shape
weights_shape
=
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
3
,
3
}};
migraphx
::
shape
output_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
migraphx
::
shape
output_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
{{
1
,
10
},
{
1
,
1
},
{
5
,
5
},
{
5
,
5
}}};
{{
1
,
10
},
{
1
,
1
},
{
5
,
5
},
{
5
,
5
}}};
...
@@ -393,7 +393,7 @@ TEST_CASE(conv_autopad_dyn_img)
...
@@ -393,7 +393,7 @@ TEST_CASE(conv_autopad_dyn_img)
{
{
// auto_pad dynamic img
// auto_pad dynamic img
migraphx
::
shape
input_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
migraphx
::
shape
input_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
{{
1
,
1
},
{
3
,
3
},
{
5
,
10
},
{
5
,
10
}}};
{{
1
,
1
},
{
3
,
3
},
{
5
,
10
},
{
5
,
10
}}};
migraphx
::
shape
weights_shape
=
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
3
,
3
}};
migraphx
::
shape
weights_shape
=
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
3
,
3
}};
migraphx
::
shape
output_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
migraphx
::
shape
output_dyn_shape
=
{
migraphx
::
shape
::
float_type
,
{{
1
,
1
},
{
1
,
1
},
{
5
,
10
},
{
5
,
10
}}};
{{
1
,
1
},
{
1
,
1
},
{
5
,
10
},
{
5
,
10
}}};
...
...
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