Skip to content

Commit 3b8795f

Browse files
use --noc_sat_routing_num_workers only when it is explicitly specified
Otherwise, set the number of parallel SAT solver workers to -j
1 parent 90d4938 commit 3b8795f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

libs/EXTERNAL/libargparse/src/argparse.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace argparse {
173173
//Sets the hlep text
174174
Argument& help(std::string help_str);
175175

176-
//Sets the defuault value
176+
//Sets the default value
177177
Argument& default_value(const std::string& default_val);
178178
Argument& default_value(const std::vector<std::string>& default_val);
179179
Argument& default_value(const std::initializer_list<std::string>& default_val);

vpr/src/base/SetupVPR.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,15 @@ static void SetupNocOpts(const t_options& Options, t_noc_opts* NocOpts) {
749749
NocOpts->noc_sat_routing_bandwidth_resolution = Options.noc_sat_routing_bandwidth_resolution;
750750
NocOpts->noc_sat_routing_latency_overrun_weighting = Options.noc_sat_routing_latency_overrun_weighting_factor;
751751
NocOpts->noc_sat_routing_congestion_weighting = Options.noc_sat_routing_congestion_weighting_factor;
752-
NocOpts->noc_sat_routing_num_workers = Options.noc_sat_routing_num_workers;
752+
if (Options.noc_sat_routing_num_workers.provenance() == argparse::Provenance::SPECIFIED) {
753+
NocOpts->noc_sat_routing_num_workers = Options.noc_sat_routing_num_workers;
754+
} else {
755+
NocOpts->noc_sat_routing_num_workers = (int)Options.num_workers;
756+
}
753757
NocOpts->noc_sat_routing_log_search_progress = Options.noc_sat_routing_log_search_progress;
754758
NocOpts->noc_placement_file_name = Options.noc_placement_file_name;
759+
760+
755761
}
756762

757763
static void SetupServerOpts(const t_options& Options, t_server_opts* ServerOpts) {

vpr/src/base/read_options.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
15161516
gen_grp.add_argument<bool, ParseOnOff>(args.strict_checks, "--strict_checks")
15171517
.help(
15181518
"Controls whether VPR enforces some consistency checks strictly (as errors) or treats them as warnings."
1519-
" Usually these checks indicate an issue with either the targetted architecture, or consistency issues"
1519+
" Usually these checks indicate an issue with either the targeted architecture, or consistency issues"
15201520
" with VPR's internal data structures/algorithms (possibly harming optimization quality)."
15211521
" In specific circumstances on specific architectures these checks may be too restrictive and can be turned off."
15221522
" However exercise extreme caution when turning this option off -- be sure you completely understand why the issue"
@@ -2902,8 +2902,8 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
29022902
noc_grp.add_argument<int>(args.noc_sat_routing_num_workers, "--noc_sat_routing_num_workers")
29032903
.help(
29042904
"The maximum number of parallel threads that the SAT solver can use to explore the solution space.\n"
2905-
"When set to 0, the number of parallel workers is set automatically to maximize parallelism.")
2906-
.default_value("0")
2905+
"If not explicitly specified by the user, VPR will set the number parallel SAT solver workers to the value "
2906+
"specified by -j command line option.")
29072907
.show_in(argparse::ShowIn::HELP_ONLY);
29082908

29092909
noc_grp.add_argument<bool, ParseOnOff>(args.noc_sat_routing_log_search_progress, "--noc_sat_routing_log_search_progress")

0 commit comments

Comments
 (0)