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
cce6db32
Commit
cce6db32
authored
Aug 03, 2023
by
Ted Themistokleous
Browse files
Always add contiguous to reshapes
this will get filtered out once proper order and aliasing is determined
parent
8887216b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/onnx/parse_reshape.cpp
src/onnx/parse_reshape.cpp
+2
-1
src/tf/parse_reshape.cpp
src/tf/parse_reshape.cpp
+3
-2
No files found.
src/onnx/parse_reshape.cpp
View file @
cce6db32
...
...
@@ -54,7 +54,8 @@ struct parse_reshape : op_parser<parse_reshape>
}
auto
cont
=
info
.
add_instruction
(
make_op
(
"contiguous"
),
args
[
0
]);
return
info
.
add_instruction
(
make_op
(
"reshape"
,
{{
"dims"
,
dims
}}),
cont
);
auto
resh
=
info
.
add_instruction
(
make_op
(
"reshape"
,
{{
"dims"
,
dims
}}),
cont
);
return
info
.
add_instruction
(
make_op
(
"contiguous"
),
resh
);
}
};
...
...
src/tf/parse_reshape.cpp
View file @
cce6db32
...
...
@@ -45,8 +45,9 @@ struct parse_reshape : op_parser<parse_reshape>
auto
s
=
args
[
1
]
->
eval
();
std
::
vector
<
int64_t
>
dims
;
s
.
visit
([
&
](
auto
v
)
{
copy
(
v
,
std
::
back_inserter
(
dims
));
});
return
info
.
add_instruction
(
make_op
(
"reshape"
,
{{
"dims"
,
dims
}}),
info
.
make_contiguous
(
args
[
0
]));
auto
resh
=
info
.
add_instruction
(
make_op
(
"reshape"
,
{{
"dims"
,
dims
}}),
info
.
make_contiguous
(
args
[
0
]));
return
info
.
make_contiguous
(
resh
);
}
};
...
...
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