Skip to content

Commit

Permalink
Fix eval_proc_main's Block simulation
Browse files Browse the repository at this point in the history
Broken for channels with empty expected values after commit 66424e6, as we failed to initialize the queues.

PiperOrigin-RevId: 625461582
  • Loading branch information
ericastor authored and copybara-github committed Apr 16, 2024
1 parent 1745a13 commit 35c5114
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions xls/tools/eval_proc_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -721,15 +721,11 @@ static absl::Status RunBlock(
absl::flat_hash_map<std::string, std::deque<Value>> channel_value_queues;
for (const auto& [name, values] : inputs_for_channels) {
CHECK(!channel_value_queues.contains(name));
for (const Value& value : values) {
channel_value_queues[name].push_back(value);
}
absl::c_copy(values, std::back_inserter(channel_value_queues[name]));
}
for (const auto& [name, values] : expected_outputs_for_channels) {
CHECK(!channel_value_queues.contains(name));
for (const Value& value : values) {
channel_value_queues[name].push_back(value);
}
absl::c_copy(values, std::back_inserter(channel_value_queues[name]));
}

absl::flat_hash_map<std::string, std::unique_ptr<MemoryModel>> model_memories;
Expand Down

0 comments on commit 35c5114

Please sign in to comment.