Skip to content

[OV][ITT] Enhance ITT MACROS to accept metadata for ID propagation - Redux#33639

Open
tovinkere wants to merge 8 commits intoopenvinotoolkit:masterfrom
tovinkere:itt_markers_extn_core2
Open

[OV][ITT] Enhance ITT MACROS to accept metadata for ID propagation - Redux#33639
tovinkere wants to merge 8 commits intoopenvinotoolkit:masterfrom
tovinkere:itt_markers_extn_core2

Conversation

@tovinkere
Copy link
Contributor

@tovinkere tovinkere commented Jan 16, 2026

#Feature enhancement - Part 1

This PR is the first of a series of PRs to standardize the ITT markers in OpenVINO that will be enabled by default through host-side instrumentation.

  1. This first PR addresses the enhancements required in ITT and the framework to support the creation and propagation of IDs when asynchronous execution is in play.
  2. The second PR will standardize ITT markers in the CPU and enhance support to include asynchronous execution.
  3. The third PR will enable default markers for GPU plugin to allow visibility into inference pass begin/end and operator preparation and submission within each inference.
  4. The final PR will extend the same host side markers for NPU execution, which capturing the inference span and pipeline activity.

##Summary of the current PR (PR#1)

  • Enhances base macros to also accept metadata as a pair that will be associated with a region or a task
  • Updated core markers, such as Read Model, Compile Model to follow a standard convention and belong to the namespace ov::phases, which is also the ITT domain
  • Added early exit to domain and string handle creation if a collector is not initialized and actively receiving the data

##Details:
For some plugins that use pipeline execution during asynchronous evaluation, the inference is initiated on one thread, the pipeline execution begins on another thread and is completed on a different thread. In order to get the full inference time, including host side timestamps, the stages of execution that belong to the same inference pass MUST:

  • Share the same inference ID, which is provided by a thread-safe global counter
  • This ID must be associated with the region or task of interest
  • And propagated by the ITT subsystem. ScopedRegion() and ScopedTask() have been enhanced to support this.

Tickets:

@praasz This is resubmitted PR after the corruption of PR #33311

 - This first PR addresses the enhancements required
   in ITT and the framework to support the creation
   and propagation of IDs when asynchronous execution
   is in play

 - Enhances base macros to also accept metadata as a
   pair that will be associated with a region or a task
 - Updated core markers, such as Read Model, Compile Model
   to follow a standard convention and belong to the
   namespace ov::phases, which is also the ITT domain
 - Added early exit to domain and string handle creation
   if a collector is not initialized and actively receiving
   the data

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
@tovinkere tovinkere requested a review from a team as a code owner January 16, 2026 07:39
@praasz praasz self-assigned this Jan 16, 2026
@praasz
Copy link
Contributor

praasz commented Jan 16, 2026

build_jenkins

- Moved the MACROS for ID initialization, ID update
  and global ID to the implementation file.
- The class IAsyncInferRequest will always have the
  counter variable as a member. The update this member
  depends on whether ENABLE_PROFILING_ITT=BASE or FULL
  is set and should not happen when it is set to OFF

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
@praasz
Copy link
Contributor

praasz commented Jan 19, 2026

build_jenkins

OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Inference,
"Inference::pipeline",
"InferenceID",
m_infer_id); // DO NOT MODIFY!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove all markers that is should not be modified as on plugin requests

@praasz
Copy link
Contributor

praasz commented Jan 19, 2026

build_jenkins

OV_ITT_DOMAIN(OV, "ov");
OV_ITT_DOMAIN(ReadTime, "ov::ReadTime");
OV_ITT_DOMAIN(LoadTime, "ov::LoadTime");
// Domain used for marking phases in the runtime
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is not descriptive. "Phases" of which process are being marked here?

// default to the parent task's ID
__itt_metadata_add(domain,
__itt_null,
__itt_string_handle_create(key ? key : "unknown"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is key == nullptr possible on this line? We have checked if key is null or not on line 74

// Associate the <key-value> pair with the region
__itt_metadata_add(domain,
region_id,
__itt_string_handle_create(key ? key : "unknown"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question about key being null is applicable here

@praasz
Copy link
Contributor

praasz commented Jan 19, 2026

build_jenkins

github-merge-queue bot pushed a commit that referenced this pull request Jan 21, 2026
…d async support (#33312)

Standardizing CPU ITT marker + support for asynchronous execution - Part
2

This PR is the second of a series of PRs to standardize the ITT markers
in OpenVINO that will be enabled by default through host-side
instrumentation.

1. The first PR addresses the enhancements required in ITT and the
framework to support the creation and propagation of IDs when
asynchronous execution is in play
[PR#33639](#33639).
2. This ***second PR*** will standardize ITT markers in the CPU and
enhance support to include asynchronous execution.
3. The third PR will enable default markers for GPU plugin to allow
visibility into inference pass begin/end and operator preparation and
submission within each inference.
4. The final PR will extend the same host side markers for NPU
execution, which capturing the inference span and pipeline activity.

Summary of the current PR (PR#2)
+ Use the same convention standardized in
[PR#33639](#33639)
+ Ensures the namespace for CPU Plugin activity falls under: 
  - ov::phases::inference 
  - ov::phases::cpu::inference 
  - ov::op::cpu::exec 
  - ov::op::cpu::details

Details:
CPU support with default enabled ITT markers was limited to synchronous
execution. This PR enhances the default support to include asynchronous
behavior and ensures a standardized convention is followed in namespaces
used.

@aobolensk Please review as this is an enhancement of your work with
synchronous execution.

See [CVS-179230](https://jira.devtools.intel.com/browse/CVS-179230)
benchmark data for smoke tests that include low-latency models.

---------

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
- Seeing if the MACROS are the cause of conditional
  compilation failures
- Reducing string constructor overheads as the required
  string is already being constructed in the constructor

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
@tovinkere tovinkere requested review from a team as code owners February 9, 2026 17:26
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph) category: CPU OpenVINO CPU plugin category: inference OpenVINO Runtime library - Inference ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants