Checks the number of inputs/outputs of `cond_graph` and `body_graph`.
(cond_graph, body_graph, num_flattened_loop_vars)
| 1071 | |
| 1072 | |
| 1073 | def _check_num_inputs_outputs(cond_graph, body_graph, num_flattened_loop_vars): |
| 1074 | """Checks the number of inputs/outputs of `cond_graph` and `body_graph`.""" |
| 1075 | assert len(cond_graph.inputs) == num_flattened_loop_vars, ( |
| 1076 | "cond_graph takes %d inputs; Expected: %d" % (len(cond_graph.inputs), |
| 1077 | num_flattened_loop_vars)) |
| 1078 | assert len(cond_graph.outputs) == 1, ( |
| 1079 | "cond_graph has %d outputs; Expected: 1" % len(cond_graph.outputs)) |
| 1080 | assert len(body_graph.inputs) == num_flattened_loop_vars, ( |
| 1081 | "body_graph takes %d inputs; Expected: %d" % (len(body_graph.inputs), |
| 1082 | num_flattened_loop_vars)) |
| 1083 | assert len(body_graph.outputs) == num_flattened_loop_vars, ( |
| 1084 | "body_graph has %d outputs; Expected: %d" % (len(body_graph.outputs), |
| 1085 | num_flattened_loop_vars)) |
| 1086 | |
| 1087 | |
| 1088 | def _check_inputs_outputs_types_match(body_graph, flattened_loop_vars): |
no outgoing calls
no test coverage detected