Skip to content

Commit

Permalink
Review edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian committed Sep 13, 2023
1 parent 4d05b7a commit 0e6dc34
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/backend_model_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,12 @@ TritonModelInstance::WarmUp()
request->SetResponseCallback(
&warmup_allocator, nullptr, WarmupResponseComplete,
&response_complete[i]);

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

// Capture timestamp before run to avoid incorrect accumulation from
// sequential warmup runs
#ifdef TRITON_ENABLE_STATS
Expand All @@ -631,11 +637,6 @@ TritonModelInstance::WarmUp()
request->CaptureQueueStartNs();
triton_requests.push_back(
reinterpret_cast<TRITONBACKEND_Request*>(request.get()));

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

Execute(triton_requests);
Expand Down

0 comments on commit 0e6dc34

Please sign in to comment.