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
2a8e8d07
Commit
2a8e8d07
authored
Jun 13, 2022
by
Paul
Browse files
Use std::transform
parent
9840f756
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/simplify_reshapes.cpp
src/simplify_reshapes.cpp
+3
-4
No files found.
src/simplify_reshapes.cpp
View file @
2a8e8d07
...
@@ -626,10 +626,9 @@ struct find_slice_transpose
...
@@ -626,10 +626,9 @@ struct find_slice_transpose
auto
split
=
splits
[
i
];
auto
split
=
splits
[
i
];
auto
t
=
transposes
[
i
];
auto
t
=
transposes
[
i
];
auto
op
=
any_cast
<
op
::
slice
>
(
split
->
get_operator
());
auto
op
=
any_cast
<
op
::
slice
>
(
split
->
get_operator
());
for
(
auto
&
axis
:
op
.
axes
)
std
::
transform
(
op
.
axes
.
begin
(),
op
.
axes
.
end
(),
op
.
axes
.
begin
(),
[
&
](
auto
axis
)
{
{
return
iperm
[
axis
];
axis
=
iperm
[
axis
];
});
}
auto
new_ins
=
m
.
insert_instruction
(
t
,
op
,
pre
);
auto
new_ins
=
m
.
insert_instruction
(
t
,
op
,
pre
);
if
(
t
->
get_operator
()
!=
pre
->
get_operator
())
if
(
t
->
get_operator
()
!=
pre
->
get_operator
())
{
{
...
...
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