Skip to content

Commit b9a458c

Browse files
Merge branch 'master' into feature-ap-solver
2 parents 96c7fb6 + c43f4b3 commit b9a458c

File tree

7 files changed

+22
-4
lines changed

7 files changed

+22
-4
lines changed

doc/src/vpr/command_line_usage.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,13 @@ If any of init_t, exit_t or alpha_t is specified, the user schedule, with a fixe
926926

927927
**Default:** ``move_block_type``
928928

929+
.. option:: --place_quench_only {on | off}
930+
931+
If this option is set to ``on``, the placement will skip the annealing phase and only perform the placement quench.
932+
This option is useful when the the quality of initial placement is good enough and there is no need to perform the
933+
annealing phase.
934+
935+
**Default:** ``off``
929936

930937

931938
.. option:: --placer_debug_block <int>

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ static void SetupPlacerOpts(const t_options& Options, t_placer_opts* PlacerOpts)
693693
PlacerOpts->place_constraint_subtile = Options.place_constraint_subtile;
694694
PlacerOpts->floorplan_num_horizontal_partitions = Options.floorplan_num_horizontal_partitions;
695695
PlacerOpts->floorplan_num_vertical_partitions = Options.floorplan_num_vertical_partitions;
696+
PlacerOpts->place_quench_only = Options.place_quench_only;
696697

697698
PlacerOpts->seed = Options.Seed;
698699

vpr/src/base/read_options.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,12 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
23582358
.default_value("0")
23592359
.show_in(argparse::ShowIn::HELP_ONLY);
23602360

2361+
place_grp.add_argument<bool, ParseOnOff>(args.place_quench_only, "--place_quench_only")
2362+
.help(
2363+
"Skip the placement annealing phase and go straight to the placement quench.")
2364+
.default_value("off")
2365+
.show_in(argparse::ShowIn::HELP_ONLY);
2366+
23612367
place_grp.add_argument<e_agent_algorithm, ParsePlaceAgentAlgorithm>(args.place_agent_algorithm, "--place_agent_algorithm")
23622368
.help("Controls which placement RL agent is used")
23632369
.default_value("softmax")

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ struct t_options {
157157
argparse::ArgValue<bool> place_constraint_subtile;
158158
argparse::ArgValue<int> floorplan_num_horizontal_partitions;
159159
argparse::ArgValue<int> floorplan_num_vertical_partitions;
160+
argparse::ArgValue<bool> place_quench_only;
160161

161162
argparse::ArgValue<int> placer_debug_block;
162163
argparse::ArgValue<int> placer_debug_net;

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ struct t_placer_opts {
10141014
bool place_constraint_subtile;
10151015
int floorplan_num_horizontal_partitions;
10161016
int floorplan_num_vertical_partitions;
1017+
bool place_quench_only;
10171018

10181019
int placer_debug_block;
10191020
int placer_debug_net;

vpr/src/place/placer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Placer::Placer(const Netlist<>& net_list,
4545
, net_cost_handler_(placer_opts, placer_state_, cube_bb)
4646
, place_delay_model_(std::move(place_delay_model))
4747
, log_printer_(*this, quiet)
48+
, quench_only_(placer_opts.place_quench_only)
4849
, is_flat_(is_flat) {
4950
const auto& cluster_ctx = g_vpr_ctx.clustering();
5051

@@ -284,16 +285,15 @@ int Placer::check_placement_costs_() {
284285
void Placer::place() {
285286
const auto& timing_ctx = g_vpr_ctx.timing();
286287
const auto& cluster_ctx = g_vpr_ctx.clustering();
287-
288-
bool skip_anneal = false;
288+
bool analytic_place_enabled = false;
289289
#ifdef ENABLE_ANALYTIC_PLACE
290290
// Cluster-level analytic placer: when enabled, skip most of the annealing and go straight to quench
291291
if (placer_opts_.enable_analytic_placer) {
292-
skip_anneal = true;
292+
analytic_place_enabled = true;
293293
}
294294
#endif
295295

296-
if (!skip_anneal) {
296+
if (!analytic_place_enabled && !quench_only_) {
297297
// Table header
298298
log_printer_.print_place_status_header();
299299

vpr/src/place/placer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ class Placer {
9797
std::shared_ptr<PlaceDelayModel> place_delay_model_;
9898
/// Prints logs during placement
9999
const PlacementLogPrinter log_printer_;
100+
/// Indicates if the placement quench phase should be skipped.
101+
const bool quench_only_;
100102
/// Indicates if flat routing resource graph and delay model is used. It should be false.
101103
const bool is_flat_;
102104

0 commit comments

Comments
 (0)