Commit 9287e9c8 authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Remove debug test in parse_if operator

parent ea2d51bf
...@@ -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)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment