Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
228b665c
Commit
228b665c
authored
Oct 17, 2022
by
Khalique Ahmed
Browse files
formatting
parent
98b8dff1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/layout_nhwc.cpp
src/layout_nhwc.cpp
+7
-5
No files found.
src/layout_nhwc.cpp
View file @
228b665c
...
@@ -61,24 +61,26 @@ void transform_convolutions(module& m, bool skip_elim_contiguous)
...
@@ -61,24 +61,26 @@ void transform_convolutions(module& m, bool skip_elim_contiguous)
// std::cout << "HERE" << std::endl;
// std::cout << "HERE" << std::endl;
for
(
auto
i
=
0
;
i
<
args
.
size
();
i
++
)
for
(
auto
i
=
0
;
i
<
args
.
size
();
i
++
)
{
{
// std::cout << args[i]->name() << std::endl;
// std::cout << args[i]->name() << std::endl;
if
(
args
[
i
]
->
name
()
!=
"layout"
and
args
[
i
]
->
get_shape
().
standard
())
if
(
args
[
i
]
->
name
()
!=
"layout"
and
args
[
i
]
->
get_shape
().
standard
())
{
{
// std::cout << "HERE2" << std::endl;
// std::cout << "HERE2" << std::endl;
args
[
i
]
=
m
.
insert_instruction
(
ins
,
make_op
(
"layout"
,
{{
"permutation"
,
{
0
,
2
,
3
,
1
}}}),
args
[
i
]);
args
[
i
]
=
m
.
insert_instruction
(
ins
,
make_op
(
"layout"
,
{{
"permutation"
,
{
0
,
2
,
3
,
1
}}}),
args
[
i
]);
// m.debug_print(args);
// m.debug_print(args);
}
}
}
}
}
}
else
else
std
::
transform
(
args
.
begin
(),
args
.
end
(),
args
.
begin
(),
[
&
](
auto
&
i
)
{
std
::
transform
(
args
.
begin
(),
args
.
end
(),
args
.
begin
(),
[
&
](
auto
&
i
)
{
return
m
.
insert_instruction
(
ins
,
make_op
(
"layout"
,
{{
"permutation"
,
{
0
,
2
,
3
,
1
}}}),
i
);
return
m
.
insert_instruction
(
ins
,
make_op
(
"layout"
,
{{
"permutation"
,
{
0
,
2
,
3
,
1
}}}),
i
);
});
});
auto
conv
=
m
.
insert_instruction
(
ins
,
ins
->
get_operator
(),
args
);
auto
conv
=
m
.
insert_instruction
(
ins
,
ins
->
get_operator
(),
args
);
auto
c
=
conv
;
auto
c
=
conv
;
if
(
not
skip_elim_contiguous
)
if
(
not
skip_elim_contiguous
)
c
=
m
.
insert_instruction
(
ins
,
make_op
(
"contiguous"
),
conv
);
c
=
m
.
insert_instruction
(
ins
,
make_op
(
"contiguous"
),
conv
);
m
.
replace_instruction
(
ins
,
c
);
m
.
replace_instruction
(
ins
,
c
);
}
}
}
}
...
...
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