"megatron/vscode:/vscode.git/clone" did not exist on "36c2674c19f47882eb03271a8ef305541dd92ce2"
Unverified Commit afdc3051 authored by Ted Themistokleous's avatar Ted Themistokleous Committed by GitHub
Browse files

Add node name to debug output of PARSE_IF (#1318)

Gives better clarity to which argument is throwing an error, especially in cases with nested IF statements in the network.
parent 4918d769
...@@ -47,7 +47,8 @@ struct parse_if : op_parser<parse_if> ...@@ -47,7 +47,8 @@ struct parse_if : op_parser<parse_if>
if(args.front()->get_shape().elements() != 1) if(args.front()->get_shape().elements() != 1)
{ {
MIGRAPHX_THROW("PARSE_IF: condition input can have only one element!"); MIGRAPHX_THROW("PARSE_IF: " + info.name +
" condition input can have only one element!");
} }
std::string then_name = info.name + "_if"; std::string then_name = info.name + "_if";
...@@ -69,7 +70,8 @@ struct parse_if : op_parser<parse_if> ...@@ -69,7 +70,8 @@ struct parse_if : op_parser<parse_if>
else_out_shapes.begin(), else_out_shapes.begin(),
else_out_shapes.end())) else_out_shapes.end()))
{ {
MIGRAPHX_THROW("PARSE_IF: then and else sub_grahps must have same output shapes!"); 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 if_ret = info.add_instruction(make_op("if"), args, {then_mdl, else_mdl});
......
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