Commit cce7448d authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Adding more debug

Commenting out errors for now. Just commenting out checks to see where and what is breaking.
parent 8840ccb3
......@@ -51,11 +51,11 @@ struct if_op
auto out_shapes0 = mods[0]->get_output_shapes();
auto out_shapes1 = mods[1]->get_output_shapes();
if(not std::equal(
/*if(not std::equal(
out_shapes1.begin(), out_shapes1.end(), out_shapes0.begin(), out_shapes0.end()))
{
MIGRAPHX_THROW("IF: output shapes of submodules must be the same.");
}
}*/
return {out_shapes0};
}
......
......@@ -59,10 +59,10 @@ struct squeeze
auto type = input_shape.type();
auto old_lens = input_shape.lens();
auto old_strides = input_shape.strides();
if(std::any_of(axes.begin(), axes.end(), [&](auto axis) { return old_lens[axis] != 1; }))
/*if(std::any_of(axes.begin(), axes.end(), [&](auto axis) { return old_lens[axis] != 1; }))
{
MIGRAPHX_THROW("squeeze axis dimension should be equal to 1");
}
} */
std::vector<std::size_t> new_lens;
std::vector<std::size_t> new_strides;
if(axes.empty())
......
......@@ -43,7 +43,8 @@ struct parse_constant : op_parser<parse_constant>
// return empty literal
if(v.get_shape().elements() == 0)
{
return info.add_literal(literal{});
shape s{shape::int64_type, {31702968, 1}, {1, 1}};
return info.add_literal(literal(s, {0}));
}
auto dim_size = info.attributes.at("value").t().dims_size();
......
......@@ -65,14 +65,14 @@ struct parse_if : op_parser<parse_if>
auto then_out_shapes = then_mdl->get_output_shapes();
auto else_out_shapes = else_mdl->get_output_shapes();
if(not std::equal(then_out_shapes.begin(),
/*if(not std::equal(then_out_shapes.begin(),
then_out_shapes.end(),
else_out_shapes.begin(),
else_out_shapes.end()))
{
MIGRAPHX_THROW("PARSE_IF: " + info.name +
" then and else sub_grahps must have same output shapes!");
}
}*/
auto if_ret = info.add_instruction(make_op("if"), args, {then_mdl, else_mdl});
auto out_s = if_ret->get_shape();
......
......@@ -68,7 +68,8 @@ struct parse_split : op_parser<parse_split>
if((lens[tuned_axis] % info.num_outputs) != 0)
{
MIGRAPHX_THROW("PARSE_SPLIT: input cannot be equally divided into " +
std::to_string(info.num_outputs) + " splits!");
std::to_string(info.num_outputs) + " splits! " +
std::to_string(tuned_axis));
}
auto dl = lens[tuned_axis] / info.num_outputs;
vec_splits.resize(info.num_outputs, dl);
......
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