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
9287e9c8
Commit
9287e9c8
authored
Oct 12, 2022
by
Ted Themistokleous
Browse files
Remove debug test in parse_if operator
parent
ea2d51bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
src/onnx/parse_if.cpp
src/onnx/parse_if.cpp
+0
-9
No files found.
src/onnx/parse_if.cpp
View file @
9287e9c8
...
@@ -99,28 +99,21 @@ struct parse_if : op_parser<parse_if>
...
@@ -99,28 +99,21 @@ struct parse_if : op_parser<parse_if>
// need to update the then_shape before we do further checks
// need to update the then_shape before we do further checks
if
(
then_shape
.
size
()
==
0
)
if
(
then_shape
.
size
()
==
0
)
{
{
std
::
cout
<<
"Scalar then_shape "
<<
then_shape
.
size
()
<<
std
::
endl
;
auto
convert_ins
=
then_mdl
->
add_outline
(
else_out_shapes
.
at
(
0
));
auto
convert_ins
=
then_mdl
->
add_outline
(
else_out_shapes
.
at
(
0
));
then_mdl
->
replace_return
({
convert_ins
});
then_mdl
->
replace_return
({
convert_ins
});
then_shape
=
else_shape
;
then_shape
=
else_shape
;
std
::
cout
<<
"Scalar then_shape update "
<<
then_shape
.
size
()
<<
std
::
endl
;
}
}
else
if
(
else_shape
.
size
()
==
0
)
else
if
(
else_shape
.
size
()
==
0
)
{
{
std
::
cout
<<
"Scalar else_shape "
<<
else_shape
.
size
()
<<
std
::
endl
;
auto
convert_ins
=
else_mdl
->
add_outline
(
then_out_shapes
.
at
(
0
));
auto
convert_ins
=
else_mdl
->
add_outline
(
then_out_shapes
.
at
(
0
));
else_mdl
->
replace_return
({
convert_ins
});
else_mdl
->
replace_return
({
convert_ins
});
else_shape
=
then_shape
;
else_shape
=
then_shape
;
std
::
cout
<<
"Scalar else_shape update "
<<
else_shape
.
size
()
<<
std
::
endl
;
}
}
else
else
{
{
// check equivilant length dims, and (x1,x2,.., xn, 1) == (x1,x2,..,xn)
// check equivilant length dims, and (x1,x2,.., xn, 1) == (x1,x2,..,xn)
int
dim_delta
=
abs
((
static_cast
<
int
>
(
then_shape
.
size
()
-
else_shape
.
size
())));
int
dim_delta
=
abs
((
static_cast
<
int
>
(
then_shape
.
size
()
-
else_shape
.
size
())));
std
::
cout
<<
"Then shape "
<<
then_shape
.
size
()
<<
" else shape "
<<
else_shape
.
size
()
<<
std
::
endl
;
if
(
dim_delta
<=
1
)
if
(
dim_delta
<=
1
)
{
{
// make sure dims are equivalent in static shapes
// make sure dims are equivalent in static shapes
...
@@ -134,7 +127,6 @@ struct parse_if : op_parser<parse_if>
...
@@ -134,7 +127,6 @@ struct parse_if : op_parser<parse_if>
if
(
then_shape
.
size
()
<
else_shape
.
size
())
if
(
then_shape
.
size
()
<
else_shape
.
size
())
{
{
auto
last_else
=
*
(
--
(
else_shape
.
end
()));
auto
last_else
=
*
(
--
(
else_shape
.
end
()));
std
::
cout
<<
"Last else "
<<
last_else
<<
std
::
endl
;
if
(
last_else
<=
1
)
if
(
last_else
<=
1
)
{
{
...
@@ -145,7 +137,6 @@ struct parse_if : op_parser<parse_if>
...
@@ -145,7 +137,6 @@ struct parse_if : op_parser<parse_if>
else
else
{
{
auto
last_then
=
*
(
--
(
then_shape
.
end
()));
auto
last_then
=
*
(
--
(
then_shape
.
end
()));
std
::
cout
<<
"Last then "
<<
last_then
<<
std
::
endl
;
if
(
last_then
<=
1
)
if
(
last_then
<=
1
)
{
{
...
...
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