Fix ophint_extraction topo sort.

some like placeholder's operand is only value.

PiperOrigin-RevId: 268408389
This commit is contained in:
Renjie Liu 2019-09-11 01:28:04 -07:00 committed by TensorFlower Gardener
parent b1ba664b53
commit 8c0df1fa0b

View File

@ -378,6 +378,10 @@ void PreprocessTopoSortGraph(
Operation* input_op = op.getOperand(i)->getDefiningOp();
if (input_op) input_ops.insert(input_op);
}
if (input_ops.empty()) {
init_queue->push(&op);
continue;
}
operation_to_in_degrees->try_emplace(&op, input_ops.size());
for (auto* input_op : input_ops) {
auto preceeding_op_it = operation_to_ouputs->find(input_op);