-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Enable ETW Tracing for OVEP #827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ovep-develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables ETW (Event Tracing for Windows) logging for the OpenVINO Execution Provider (OVEP) to support runtime tracing of session and provider options. The implementation adds comprehensive logging capabilities that can be consumed through Windows Performance Recorder (WPR) tools for debugging and monitoring OVEP behavior.
- Introduces a new telemetry system with ETW provider registration and structured JSON logging
- Adds configuration to Windows Performance Recording Profile for OVEP tracing
- Integrates telemetry logging into the OpenVINO execution provider lifecycle
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ort.wprp | Adds OpenVINO EP event provider configuration to Windows Performance Recording Profile |
ov_telemetry.h | Defines telemetry interface and ETW provider declarations for OpenVINO EP |
ov_telemetry.cc | Implements ETW tracing functionality with JSON serialization for provider/session options |
openvino_execution_provider.h | Adds telemetry includes and session tracking members |
openvino_execution_provider.cc | Integrates telemetry logging into provider constructor |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
std::lock_guard<std::mutex> lock_callbacks(callbacks_mutex_); | ||
callbacks_.clear(); |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential deadlock scenario: The destructor acquires callbacks_mutex_ while already holding mutex_. If another thread calls RegisterInternalCallback or UnregisterInternalCallback while the destructor is running, it could create a deadlock. Consider releasing the first lock before acquiring the second, or use a single mutex for both operations.
Copilot uses AI. Check for mistakes.
AddOptionalValue(sopts, "ep.context_enable", ctx.so_context_enable, false, first); | ||
AddOptionalValue(sopts, "session.disable_cpu_ep_fallback", ctx.so_disable_cpu_ep_fallback, false, first); | ||
AddOptionalValue(sopts, "ep.context_embed_mode", ctx.so_context_embed_mode, false, first); | ||
AddOptionalValue(sopts, "ep.context_file_path", ctx.so_share_ep_contexts, false, first); |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect parameter mapping: The function is called with 'ep.context_file_path' as the key but ctx.so_share_ep_contexts as the value, which is a boolean. This should likely be ctx.so_context_file_path or a different key name to match the boolean value being passed.
AddOptionalValue(sopts, "ep.context_file_path", ctx.so_share_ep_contexts, false, first); | |
AddOptionalValue(sopts, "ep.context_file_path", ctx.so_context_file_path, std::filesystem::path(), first); |
Copilot uses AI. Check for mistakes.
Description
This PR enables the ETW Traces Logging for OVEP for Windows OS. Currently, this PR enables logging all the Session & Provider Options supported by OVEP during runtime. Usage is governed by using below data inside ort_traces.wprp file -
Provider Name: Intel.ML.ONNXRuntime.OpenVINO
Provider GUID: b5a8c2e1-4d7f-4a3b-9c2e-1f8e5a6b7c9d
The ovep_traces.wprp file MUST include below config to enable ETW tracing for OVEP explicitly -
Sample Commands to get the ETW traces using onnxruntime_perf_test.exe app -
This PR fulfills below request - https://jira.devtools.intel.com/browse/CVS-174008