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
23490657
Commit
23490657
authored
Oct 28, 2022
by
Paul
Browse files
Format
parent
c164d8e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/layout_nhwc.cpp
src/layout_nhwc.cpp
+3
-2
No files found.
src/layout_nhwc.cpp
View file @
23490657
...
@@ -32,8 +32,9 @@ std::vector<instruction_ref> find_lasts(const module& m, Predicate pred)
...
@@ -32,8 +32,9 @@ std::vector<instruction_ref> find_lasts(const module& m, Predicate pred)
std
::
unordered_set
<
instruction_ref
>
preserve_output_layout
(
module
&
m
)
std
::
unordered_set
<
instruction_ref
>
preserve_output_layout
(
module
&
m
)
{
{
std
::
unordered_set
<
instruction_ref
>
result
;
std
::
unordered_set
<
instruction_ref
>
result
;
std
::
vector
<
instruction_ref
>
outputs
=
std
::
vector
<
instruction_ref
>
outputs
=
find_lasts
(
m
,
[](
auto
ins
)
{
find_lasts
(
m
,
[](
auto
ins
)
{
return
ins
->
name
()
==
"convolution"
and
ins
->
get_shape
().
lens
().
size
()
==
4
;
});
return
ins
->
name
()
==
"convolution"
and
ins
->
get_shape
().
lens
().
size
()
==
4
;
});
for
(
auto
output
:
outputs
)
for
(
auto
output
:
outputs
)
{
{
auto
permutation
=
find_permutation
(
output
->
get_shape
());
auto
permutation
=
find_permutation
(
output
->
get_shape
());
...
...
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