Skip to content

Commit

Permalink
Merge pull request #386 from intel/ankit/debug_mode_inference_fix
Browse files Browse the repository at this point in the history
fix: Fixed the inference with Debug flags enabled for perf counters status logging
  • Loading branch information
sfatimar authored Jun 24, 2024
2 parents ee0329c + b56d970 commit 4dfcd6e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -545,14 +545,16 @@ void BasicBackend::Infer(OrtKernelContext* ctx) {
std::cout << "Inference successful" << std::endl;
}

OVInferRequestPtr infer_request_ = infer_request;

// Once the inference is completed, the infer_request becomes free and is placed back into pool of infer_requests_
inferRequestsQueue_->putIdleRequest(std::move(infer_request));
#ifndef NDEBUG
#ifndef IO_BUFFER_ENABLED // Printing performance counts is disabled when IO_BUFFER_ENABLED
if (openvino_ep::backend_utils::IsDebugEnabled()) {
inferRequestsQueue_->printstatus(); // Printing the elements of infer_requests_ vector pool only in debug mode
std::string& hw_target = global_context_.device_type;
printPerformanceCounts(infer_request, std::cout, hw_target);
printPerformanceCounts(std::move(infer_request_), std::cout, hw_target);
}
#endif
#endif
Expand Down

0 comments on commit 4dfcd6e

Please sign in to comment.