Skip to content

Vpr noc output #2333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 13, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions vpr/src/place/place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3215,6 +3215,15 @@ static void print_placement_move_types_stats(
const MoveTypeStat& move_type_stat) {
float moves, accepted, rejected, aborted;

VTR_LOG("\n\nPercentage of different move types and block types:\n");

VTR_LOG(
"------------------ ----------------- --------------- -------------- -------------- ------------ \n");
VTR_LOG(
" Block Type Move Type Percentage(%%) Acceptance(%%) Rejection(%%) Aborted(%%)\n");
VTR_LOG(
"------------------ ----------------- --------------- -------------- -------------- ------------ \n");

float total_moves = 0;
for (size_t iaction = 0; iaction < move_type_stat.blk_type_moves.size(); iaction++) {
total_moves += move_type_stat.blk_type_moves[iaction];
Expand All @@ -3224,32 +3233,42 @@ static void print_placement_move_types_stats(
auto& cluster_ctx = g_vpr_ctx.clustering();
std::string move_name;
int agent_type = 0;
int count = 0;
int num_of_avail_moves = move_type_stat.blk_type_moves.size() / get_num_agent_types();

VTR_LOG("\n\nPercentage of different move types and block types:\n");
//Print placement information for each block type
for (auto itype : device_ctx.logical_block_types) {
//Skip non-existing block types in the netlist
if (itype.index == 0 || cluster_ctx.clb_nlist.blocks_per_type(itype).size() == 0) {
continue;
}

count = 0;

for (int imove = 0; imove < num_of_avail_moves; imove++) {
move_name = move_type_to_string(e_move_type(imove));
moves = move_type_stat.blk_type_moves[agent_type * num_of_avail_moves + imove];
if (moves != 0) {
accepted = move_type_stat.accepted_moves[agent_type * num_of_avail_moves + imove];
rejected = move_type_stat.rejected_moves[agent_type * num_of_avail_moves + imove];
aborted = moves - (accepted + rejected);
if (count == 0) {
VTR_LOG("%-18.20s", itype.name);
} else {
VTR_LOG(" ");
}
VTR_LOG(
"\t%.20s move with type %.20s: %2.6f %% (acc=%2.2f %%, rej=%2.2f %%, aborted=%2.2f %%)\n",
move_name.c_str(), itype.name, 100 * moves / total_moves,
" %-21.20s %-15.6f %-12.2f %-14.2f %-13.2f\n",
move_name.c_str(), 100 * moves / total_moves,
100 * accepted / moves, 100 * rejected / moves,
100 * aborted / moves);
}
count++;
}
agent_type++;
VTR_LOG("\n");
}
VTR_LOG("\n");
}

static void calculate_reward_and_process_outcome(
Expand Down