Skip to content

Commit

Permalink
Fix null requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian committed Sep 11, 2023
1 parent ecec1e6 commit 4e613a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend_model_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ TritonModelInstance::WarmUp()
reinterpret_cast<TRITONBACKEND_Request*>(request.get()));

// For warmup requests we need to manually set ResponseFactory
// since they don't run `PrepareForInference`.
// since they modify the callback after PrepareForInference has
// been called.
request->SetResponseFactory();
}

Expand Down
1 change: 1 addition & 0 deletions src/infer_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ InferenceRequest::CopyAsNull(const InferenceRequest& from)
lrequest->SetResponseCallback(
&null_allocator, nullptr, NullResponseComplete, nullptr);
lrequest->SetReleaseCallback(NullRequestComplete, nullptr);
lrequest->SetResponseFactory();

// Must normalize inputs here...
for (auto& pr : lrequest->original_inputs_) {
Expand Down

0 comments on commit 4e613a5

Please sign in to comment.