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
83215963
Commit
83215963
authored
Aug 03, 2022
by
Ted Themistokleous
Committed by
Ted Themistokleous
Oct 04, 2022
Browse files
fixup! First attempt at adding proper reshape for then/else modules in parse_if
parent
7a141a27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/onnx/parse_if.cpp
src/onnx/parse_if.cpp
+8
-6
No files found.
src/onnx/parse_if.cpp
View file @
83215963
...
...
@@ -92,19 +92,21 @@ struct parse_if : op_parser<parse_if>
if
(
then_out_strides
.
size
()
>
else_out_strides
.
size
())
{
else_mdl
->
insert_instruction
(
auto
reshape_ins
=
else_mdl
->
insert_instruction
(
std
::
prev
(
else_mdl
->
end
()),
migraphx
::
make_op
(
"reshape"
,
{{
"dims"
,
{
{
else_out_shapes
.
at
(
0
).
lens
().
at
(
0
),
1
}
,
{
1
,
1
}}
}}),
migraphx
::
make_op
(
"reshape"
,
{{
"dims"
,
{
else_out_shapes
.
at
(
0
).
lens
().
at
(
0
),
1
}}}),
std
::
prev
(
else_mdl
->
end
())
->
inputs
().
front
());
else_mdl
->
replace_return
({
reshape_ins
});
}
else
if
(
then_out_strides
.
size
()
<
else_out_strides
.
size
())
{
then_mdl
->
insert_instruction
(
auto
reshape_ins
=
then_mdl
->
insert_instruction
(
std
::
prev
(
then_mdl
->
end
()),
migraphx
::
make_op
(
"reshape"
,
{{
"dims"
,
{
{
then_out_shapes
.
at
(
0
).
lens
().
at
(
0
),
1
}
,
{
1
,
1
}}
}}),
migraphx
::
make_op
(
"reshape"
,
{{
"dims"
,
{
then_out_shapes
.
at
(
0
).
lens
().
at
(
0
),
1
}}}),
std
::
prev
(
then_mdl
->
end
())
->
inputs
().
front
());
then_mdl
->
replace_return
({
reshape_ins
});
}
}
...
...
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