Skip to content

Commit

Permalink
Adjust max_threads according to concurrency (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-hwoo authored and matthewkotila committed Oct 7, 2023
1 parent a9bd6cb commit a4f2ac9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/c++/perf_analyzer/command_line_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,24 @@ CLParser::VerifyOptions()
"--periodic-concurrency-range option.");
}

if (params_->is_using_periodic_concurrency_mode) {
if (params_->periodic_concurrency_range.end == pa::NO_LIMIT) {
std::cerr
<< "WARNING: The maximum attainable concurrency will be limited by "
"max_threads specification."
<< std::endl;
params_->periodic_concurrency_range.end = params_->max_threads;
} else {
if (params_->max_threads_specified) {
std::cerr << "WARNING: Overriding max_threads specification to ensure "
"requested concurrency range."
<< std::endl;
}
params_->max_threads = std::max(
params_->max_threads, params_->periodic_concurrency_range.end);
}
}

if (params_->request_parameters.size() > 0 &&
params_->protocol != cb::ProtocolType::GRPC) {
Usage(
Expand Down

0 comments on commit a4f2ac9

Please sign in to comment.