Skip to content

Commit

Permalink
[chakra][et_feeder] changed readNextWindow to remove extra resolveDep
Browse files Browse the repository at this point in the history
  • Loading branch information
changhai0109 committed Jan 19, 2024
1 parent a54a70c commit 44fcd38
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions et_feeder/et_feeder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,21 @@ void ETFeeder::readNextWindow() {
}
uint32_t num_read = 0;
do {
shared_ptr<ETFeederNode> new_node = readNode();
if (new_node == nullptr) {
et_complete_ = true;
break;
if (this->et_complete_) {
// graph read finished, but still nodes unresolved
// which means the graph is broken
assert(false);
}
for (uint32_t num_read = 0; num_read < this->window_size_; num_read++) {
std::shared_ptr<ETFeederNode> new_node = readNode();
if (new_node == nullptr) {
et_complete_ = true;
break;
}
addNode(new_node);
}

addNode(new_node);
++num_read;

resolveDep();
} while ((num_read < window_size_) || (dep_unresolved_node_set_.size() != 0));
} while (dep_unresolved_node_set_.size() != 0);

for (auto node_id_node : dep_graph_) {
uint64_t node_id = node_id_node.first;
Expand Down

0 comments on commit 44fcd38

Please sign in to comment.