Skip to content

Commit

Permalink
Merge pull request #295 from anarkiwi/bp2
Browse files Browse the repository at this point in the history
batch size.
  • Loading branch information
anarkiwi authored Jul 13, 2024
2 parents e8431b8 + 62db801 commit a9b9e00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/iq_inference_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,9 @@ iq_inference_impl::iq_inference_impl(
parse_models(model_server, model_names);
io_service_ = boost::make_shared<boost::asio::io_service>();
work_ = boost::make_shared<boost::asio::io_service::work>(*io_service_);
for (COUNT_T i = 0; i < MAX_INFERENCE; ++i) {
for (COUNT_T i = 0; i < std::min(batch_inference_, MAX_INFERENCE); ++i) {
threadpool_.create_thread(
boost::bind(&boost::asio::io_service::run, io_service_));
}
for (COUNT_T i = 0; i < MAX_INFERENCE; ++i) {
io_service_->post(
boost::bind(&iq_inference_impl::background_run_inference_, this));
}
Expand Down
2 changes: 1 addition & 1 deletion python/iqtlabs/qa_iq_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def run_flowgraph(self, n_vlen, fft_size, samp_rate, port, model_name):
samp_rate=int(samp_rate),
power_inference=True,
background=False,
batch=1,
batch=5,
)

tb.msg_connect((strobe, "strobe"), (source, "cmd"))
Expand Down

0 comments on commit a9b9e00

Please sign in to comment.