File tree Expand file tree Collapse file tree 4 files changed +32
-7
lines changed Expand file tree Collapse file tree 4 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ struct TRITONSERVER_MetricFamily;
9191/// }
9292///
9393#define TRITONSERVER_API_VERSION_MAJOR 1
94- #define TRITONSERVER_API_VERSION_MINOR 29
94+ #define TRITONSERVER_API_VERSION_MINOR 30
9595
9696/// Get the TRITONBACKEND API version supported by the Triton shared
9797/// library. This value can be compared against the
@@ -2258,6 +2258,17 @@ TRITONSERVER_DECLSPEC struct TRITONSERVER_Error* TRITONSERVER_ServerDelete(
22582258TRITONSERVER_DECLSPEC struct TRITONSERVER_Error * TRITONSERVER_ServerStop (
22592259 struct TRITONSERVER_Server * server );
22602260
2261+ /// Set the exit timeout on the server object. This value overrides the value
2262+ /// initially set through server options and provides a mechanism to update the
2263+ /// exit timeout while the serving is running.
2264+ ///
2265+ /// \param server The inference server object.
2266+ /// \param timeout The exit timeout, in seconds.
2267+ /// \return a TRITONSERVER_Error indicating success or failure.
2268+ TRITONSERVER_DECLSPEC struct TRITONSERVER_Error *
2269+ TRITONSERVER_ServerSetExitTimeout (
2270+ struct TRITONSERVER_Server * server , unsigned int timeout );
2271+
22612272/// Register a new model repository. Not available in polling mode.
22622273///
22632274/// \param server The inference server object.
Original file line number Diff line number Diff line change @@ -711,6 +711,11 @@ SequenceBatchScheduler::Enqueue(std::unique_ptr<InferenceRequest>& irequest)
711711 auto sb_itr = sequence_to_batcherseqslot_map_.find (correlation_id);
712712 auto bl_itr = sequence_to_backlog_map_.find (correlation_id);
713713
714+ sequencer_->AddReleaseCallback (
715+ irequest,
716+ [this ](std::unique_ptr<InferenceRequest>& request, const uint32_t flags)
717+ -> Status { return sequencer_->RescheduleRequest (request, flags); });
718+
714719 // If this request is not starting a new sequence its correlation ID
715720 // should already be known with a target in either a sequence slot
716721 // or in the backlog. If it doesn't then the sequence wasn't started
@@ -850,12 +855,6 @@ SequenceBatchScheduler::Enqueue(std::unique_ptr<InferenceRequest>& irequest)
850855 LOG_VERBOSE (1 ) << " Enqueuing CORRID " << correlation_id << " into batcher "
851856 << model_instance->Name () << " , sequence slot " << seq_slot
852857 << " : " << irequest->ModelName ();
853-
854- sequencer_->AddReleaseCallback (
855- irequest,
856- [this ](std::unique_ptr<InferenceRequest>& request, const uint32_t flags)
857- -> Status { return sequencer_->RescheduleRequest (request, flags); });
858-
859858 batchers_[model_instance]->Enqueue (seq_slot, correlation_id, irequest);
860859 return Status::Success;
861860}
Original file line number Diff line number Diff line change @@ -2572,6 +2572,17 @@ TRITONSERVER_ServerStop(TRITONSERVER_Server* server)
25722572 return nullptr ; // Success
25732573}
25742574
2575+ TRITONAPI_DECLSPEC TRITONSERVER_Error*
2576+ TRITONSERVER_ServerSetExitTimeout (
2577+ TRITONSERVER_Server* server, unsigned int timeout)
2578+ {
2579+ tc::InferenceServer* lserver = reinterpret_cast <tc::InferenceServer*>(server);
2580+ if (lserver != nullptr ) {
2581+ lserver->SetExitTimeoutSeconds (timeout);
2582+ }
2583+ return nullptr ; // Success
2584+ }
2585+
25752586TRITONSERVER_DECLSPEC TRITONSERVER_Error*
25762587TRITONSERVER_ServerRegisterModelRepository (
25772588 TRITONSERVER_Server* server, const char * repository_path,
Original file line number Diff line number Diff line change @@ -559,6 +559,10 @@ TRITONSERVER_ServerStop()
559559{
560560}
561561TRITONAPI_DECLSPEC void
562+ TRITONSERVER_ServerSetExitTimeout ()
563+ {
564+ }
565+ TRITONAPI_DECLSPEC void
562566TRITONSERVER_ServerPollModelRepository ()
563567{
564568}
You can’t perform that action at this time.
0 commit comments