Skip to content

Commit

Permalink
Review edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian committed Sep 12, 2023
1 parent 4e613a5 commit d4ebc5a
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 d4ebc5a

Please sign in to comment.