From d7c0a23201f0e20d93bdd36931a10cb54e2e31ba Mon Sep 17 00:00:00 2001 From: haydar-c Date: Fri, 19 Sep 2025 10:47:41 -0400 Subject: [PATCH] [Draw][Place] Skip RL updates for manual moves since not generated by a move_generator and check the manual moves option in the inner loop as well. --- vpr/src/place/annealer.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vpr/src/place/annealer.cpp b/vpr/src/place/annealer.cpp index e802d58afb..0ce20f4b99 100644 --- a/vpr/src/place/annealer.cpp +++ b/vpr/src/place/annealer.cpp @@ -767,11 +767,11 @@ t_swap_result PlacementAnnealer::try_swap_(MoveGenerator& move_generator, } move_outcome_stats.outcome = move_outcome; - // If we force a router block move then it was not proposed by the - // move generator, so we should not calculate the reward and update + // If we force a router block move or manual move then it was not proposed + // by the move generator, so we should not calculate the reward and update // the move generators status since this outcome is not a direct - // consequence of the move generator - if (!router_block_move) { + // consequence of the move generator. + if (!router_block_move && !manual_move_enabled) { move_generator.calculate_reward_and_process_outcome(move_outcome_stats, delta_c, REWARD_BB_TIMING_RELATIVE_WEIGHT); } @@ -830,6 +830,14 @@ void PlacementAnnealer::placement_inner_loop() { // Inner loop begins for (int inner_iter = 0, inner_crit_iter_count = 1; inner_iter < annealing_state_.move_lim; inner_iter++) { +#ifndef NO_GRAPHICS + // Checks manual move flag for manual move feature + t_draw_state* draw_state = get_draw_state_vars(); + if (draw_state->show_graphics) { + manual_move_enabled = manual_move_is_selected(); + } +#endif /*NO_GRAPHICS*/ + t_swap_result swap_result = try_swap_(move_generator, placer_opts_.place_algorithm, manual_move_enabled); if (swap_result.move_result == e_move_result::ACCEPTED) {