Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyncs committed Mar 28, 2024
1 parent 3297448 commit 2daaf21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```bash
mkdir bld && cd bld && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -DCMAKE_INSTALL_PREFIX:PATH=/opt -DTRITON_BACKEND_REPO_TAG=r23.02 -DTRITON_CORE_REPO_TAG=r23.02 -DTRITON_COMMON_REPO_TAG=r23.02 -DPYTHON_EXECUTABLE=/usr/local/bin/python3 .. && make -j48
```
13 changes: 5 additions & 8 deletions src/python_be.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,16 +797,12 @@ ModelInstanceState::DecoupledMessageQueueMonitor()
std::packaged_task<void()> task([this, response_send_message] {
ResponseSendDecoupled(response_send_message);
});
std::future<void> future =
boost::asio::post(*thread_pool_, std::move(task));
futures_.emplace_back(std::move(future));
boost::asio::post(*thread_pool_, std::move(task));
} else if (message->Command() == PYTHONSTUB_InferExecRequest) {
std::shared_ptr<IPCMessage> bls_execute = std::move(message);
std::packaged_task<void()> task(
[this, bls_execute] { ExecuteBLSRequest(bls_execute); });
std::future<void> future =
boost::asio::post(*thread_pool_, std::move(task));
futures_.emplace_back(std::move(future));
boost::asio::post(*thread_pool_, std::move(task));
}
}
}
Expand Down Expand Up @@ -1420,11 +1416,12 @@ ModelInstanceState::~ModelInstanceState()
Stub()->UpdateHealth();
if (Stub()->IsHealthy()) {
if (model_state->IsDecoupled()) {
futures_.clear();
thread_pool_->wait();
Stub()->ParentMessageQueue()->Push(DUMMY_MESSAGE);
decoupled_monitor_.join();
} else {
thread_pool_->wait();
}
thread_pool_->wait();
}
// Terminate stub first to allow any last
// messages to be received by the back end
Expand Down

0 comments on commit 2daaf21

Please sign in to comment.