[NPUW] Add timestamps to LLM execution profiling#34919
Draft
dylanneve1 wants to merge 3 commits intoopenvinotoolkit:masterfrom
Draft
[NPUW] Add timestamps to LLM execution profiling#34919dylanneve1 wants to merge 3 commits intoopenvinotoolkit:masterfrom
dylanneve1 wants to merge 3 commits intoopenvinotoolkit:masterfrom
Conversation
Expands on 04293e6 by adding HH:MM:SS.microsecond timestamps to LLM execution profiling points only (prefill/generate phases), for correlation with external voltage measurements on NPU. Gated behind OPENVINO_NPUW_PROF=1 and OPENVINO_NPUW_LOG_LEVEL=INFO.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds wall-clock timestamps to NPUW LLM execution profiling events to help correlate prefill/generate phases with external measurements (e.g., voltage traces), while reusing the existing profiling infrastructure.
Changes:
- Extend
ov::npuw::perf::metricto optionally emit START/END timestamped INFO logs aroundrecord(). - Add
emit_timestampsplumbing toov::npuw::perf::Profileand enable it forLLMInferRequestprofiling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/plugins/intel_npu/src/plugin/npuw/perf.hpp |
Adds timestamp emission support inside metric::record() and propagates timestamp enabling through Profile. |
src/plugins/intel_npu/src/plugin/npuw/llm_infer_request.cpp |
Enables timestamp emission for LLM execution profiling when profiling is enabled. |
- Fix move ctor to preserve vmin/vmax/total statistics - Use localtime_s/_r instead of localtime for thread safety - Gate timestamp computation on log level >= INFO to avoid unnecessary overhead when timestamps won't be visible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
Tickets:
AI Assistance: