Skip to content

Commit

Permalink
Update name of ipc message type (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
krishung5 authored Dec 19, 2023
1 parent 7551f03 commit 950c47f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/ipc_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef enum PYTHONSTUB_commandtype_enum {
PYTHONSTUB_AutoCompleteResponse,
PYTHONSTUB_LogRequest,
PYTHONSTUB_BLSDecoupledInferPayloadCleanup,
PYTHONSTUB_BLSDecoupledResponseFactoryCleanup,
PYTHONSTUB_DecoupledResponseFactoryCleanup,
PYTHONSTUB_MetricFamilyRequestNew,
PYTHONSTUB_MetricFamilyRequestDelete,
PYTHONSTUB_MetricRequestNew,
Expand Down
2 changes: 1 addition & 1 deletion src/pb_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ Stub::ServiceStubToParentRequests()
(utils_msg_payload->command_type ==
PYTHONSTUB_BLSDecoupledInferPayloadCleanup) ||
(utils_msg_payload->command_type ==
PYTHONSTUB_BLSDecoupledResponseFactoryCleanup)) {
PYTHONSTUB_DecoupledResponseFactoryCleanup)) {
SendCleanupId(utils_msg_payload, utils_msg_payload->command_type);
} else if (
utils_msg_payload->command_type == PYTHONSTUB_IsRequestCancelled) {
Expand Down
9 changes: 4 additions & 5 deletions src/python_be.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ ModelInstanceState::StubToParentMQMonitor()
break;
}
case PYTHONSTUB_BLSDecoupledInferPayloadCleanup:
case PYTHONSTUB_BLSDecoupledResponseFactoryCleanup: {
ProcessBLSCleanupRequest(message);
case PYTHONSTUB_DecoupledResponseFactoryCleanup: {
ProcessCleanupRequest(message);
break;
}
case PYTHONSTUB_IsRequestCancelled: {
Expand Down Expand Up @@ -921,7 +921,7 @@ ModelInstanceState::ProcessLogRequest(
}

void
ModelInstanceState::ProcessBLSCleanupRequest(
ModelInstanceState::ProcessCleanupRequest(
const std::unique_ptr<IPCMessage>& message)
{
AllocatedSharedMemory<char> cleanup_request_message =
Expand All @@ -932,8 +932,7 @@ ModelInstanceState::ProcessBLSCleanupRequest(
if (message->Command() == PYTHONSTUB_BLSDecoupledInferPayloadCleanup) {
// Remove the InferPayload object from the map.
infer_payload_.erase(id);
} else if (
message->Command() == PYTHONSTUB_BLSDecoupledResponseFactoryCleanup) {
} else if (message->Command() == PYTHONSTUB_DecoupledResponseFactoryCleanup) {
// Delete response factory
std::unique_ptr<
TRITONBACKEND_ResponseFactory, backend::ResponseFactoryDeleter>
Expand Down
5 changes: 2 additions & 3 deletions src/python_be.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,8 @@ class ModelInstanceState : public BackendModelInstance {
std::unique_ptr<InferResponse>* infer_response,
bi::managed_external_buffer::handle_t* response_handle);

// Process the bls decoupled cleanup request for InferPayload and
// ResponseFactory
void ProcessBLSCleanupRequest(const std::unique_ptr<IPCMessage>& message);
// Process the decoupled cleanup request for InferPayload and ResponseFactory
void ProcessCleanupRequest(const std::unique_ptr<IPCMessage>& message);

// Process request cancellation query
void ProcessIsRequestCancelled(const std::unique_ptr<IPCMessage>& message);
Expand Down
2 changes: 1 addition & 1 deletion src/response_sender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ResponseSender::~ResponseSender()
std::unique_ptr<Stub>& stub = Stub::GetOrCreateInstance();
stub->EnqueueCleanupId(
reinterpret_cast<void*>(response_factory_address_),
PYTHONSTUB_BLSDecoupledResponseFactoryCleanup);
PYTHONSTUB_DecoupledResponseFactoryCleanup);
}

void
Expand Down

0 comments on commit 950c47f

Please sign in to comment.