Skip to content

Commit 8b7780e

Browse files
call get_move_abortion_logger() in print_post_placement_stats()
1 parent efe43e9 commit 8b7780e

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

vpr/src/place/annealer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,10 @@ std::tuple<const t_swap_stats&, const MoveTypeStat&, const t_placer_statistics&>
778778
return {swap_stats_, move_type_stats_, placer_stats_};
779779
}
780780

781+
const MoveAbortionLogger& PlacementAnnealer::get_move_abortion_logger() const {
782+
return blocks_affected_.move_abortion_logger;
783+
}
784+
781785
void PlacementAnnealer::LOG_MOVE_STATS_HEADER() {
782786
if constexpr (VTR_ENABLE_DEBUG_LOGGING_CONST_EXPR) {
783787
if (move_stats_file_) {
@@ -857,4 +861,4 @@ e_move_result PlacementAnnealer::assess_swap_(double delta_c, double t) {
857861
}
858862
VTR_LOGV_DEBUG(g_vpr_ctx.placement().f_placer_debug, "\t\tMove is rejected(hill climbing)\n");
859863
return e_move_result::REJECTED;
860-
}
864+
}

vpr/src/place/annealer.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ class PlacementAnnealer {
210210
/// @brief Returns constant references to different statistics objects
211211
std::tuple<const t_swap_stats&, const MoveTypeStat&, const t_placer_statistics&> get_stats() const;
212212

213+
/**
214+
* @brief Returns MoveAbortionLogger to report how many moves
215+
* were aborted for each reason.
216+
* @return A constant reference to a MoveAbortionLogger object.
217+
*/
218+
const MoveAbortionLogger& get_move_abortion_logger() const;
219+
213220
private:
214221
/**
215222
* @brief Determines whether a move should be accepted or not.

vpr/src/place/place_log_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void PlacementLogPrinter::print_post_placement_stats() const {
207207

208208
VTR_LOG("\n");
209209
VTR_LOG("Swaps called: %d\n", swap_stats.num_ts_called);
210-
// blocks_affected.move_abortion_logger.report_aborted_moves();
210+
annealer.get_move_abortion_logger().report_aborted_moves();
211211

212212
if (placer_.placer_opts_.place_algorithm.is_timing_driven()) {
213213
//Final timing estimate

0 commit comments

Comments
 (0)