Skip to content

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

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

[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
Naseer-010 pushed a commit to Naseer-010/openvino that referenced this pull request Feb 18, 2026
…d async support (openvinotoolkit#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](openvinotoolkit#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](openvinotoolkit#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>
github-merge-queue bot pushed a commit that referenced this pull request Feb 19, 2026
… submission (#33313)

- Enables default ITT markers for higher level operations such as
inference pass, op preparation and submission
- Follows the same guidelines to standardize the conventions for
namespaces: ov::phases::gpu::inference ov::op::gpu
- Supports both synchronous and asynchronous operations

Enabling default GPU ITT markers using standard convention - Part 3

This PR is the **third** 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. The second PR will standardize ITT markers in the CPU and enhance
support to include asynchronous execution
[PR#33312](#33312).
3. This **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. Follow standardized conventions as
described in 1 and 2
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#3)

Use the same convention standardized in
[PR#33639](#33639)
Ensures the namespace for GPU Plugin activity falls under:
  ov::phases::gpu::inference
  ov::op::gpu

Details:
GPU support is enabled with default ITT markers that support synchronous
an asynchronous execution. This PR ensures a standardized convention is
followed in namespaces used.

Tickets:
[CVS-179230](https://jira.devtools.intel.com/browse/CVS-179230)

@isanghao Please review this as you are generally aware of what was
discussed

---------

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
github-merge-queue bot pushed a commit that referenced this pull request Feb 20, 2026
… submission (#33313)

- Enables default ITT markers for higher level operations such as
inference pass, op preparation and submission
- Follows the same guidelines to standardize the conventions for
namespaces: ov::phases::gpu::inference ov::op::gpu
- Supports both synchronous and asynchronous operations

Enabling default GPU ITT markers using standard convention - Part 3

This PR is the **third** 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. The second PR will standardize ITT markers in the CPU and enhance
support to include asynchronous execution
[PR#33312](#33312).
3. This **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. Follow standardized conventions as
described in 1 and 2
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#3)

Use the same convention standardized in
[PR#33639](#33639)
Ensures the namespace for GPU Plugin activity falls under:
  ov::phases::gpu::inference
  ov::op::gpu

Details:
GPU support is enabled with default ITT markers that support synchronous
an asynchronous execution. This PR ensures a standardized convention is
followed in namespaces used.

Tickets:
[CVS-179230](https://jira.devtools.intel.com/browse/CVS-179230)

@isanghao Please review this as you are generally aware of what was
discussed

---------

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

@praasz @aobolensk Closing this PR and reopening where the async helpers are associated with NPU markers.

@tovinkere tovinkere closed this Feb 24, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 26, 2026
### Details:
#Feature enhancement - Part 1
- *Core Domains:* This is a part of PR# [33639](
#33639) which has been
split.
- This PR addresses the standardization of Read/Compiler phases of the
runtime to use the new domain names
- Also reverts the SyncInferenceCPU marker type from REGION_BASE to
TASK_BASE as the second PR in this series will add the necessary hooks
for asynchronous inferences.

### Tickets:
 - [CVS-179230](https://jira.devtools.intel.com/browse/CVS-179230)

### AI Assistance:
 - *AI assistance used: no*

---------

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
mlukasze pushed a commit to mlukasze/openvino that referenced this pull request Mar 5, 2026
…vinotoolkit#34278)

### Details:
#Feature enhancement - Part 1
- *Core Domains:* This is a part of PR# [33639](
openvinotoolkit#33639) which has been
split.
- This PR addresses the standardization of Read/Compiler phases of the
runtime to use the new domain names
- Also reverts the SyncInferenceCPU marker type from REGION_BASE to
TASK_BASE as the second PR in this series will add the necessary hooks
for asynchronous inferences.

### Tickets:
 - [CVS-179230](https://jira.devtools.intel.com/browse/CVS-179230)

### AI Assistance:
 - *AI assistance used: no*

---------

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
Nishant-ZFYII pushed a commit to Nishant-ZFYII/openvino that referenced this pull request Mar 5, 2026
…vinotoolkit#34278)

### Details:
#Feature enhancement - Part 1
- *Core Domains:* This is a part of PR# [33639](
openvinotoolkit#33639) which has been
split.
- This PR addresses the standardization of Read/Compiler phases of the
runtime to use the new domain names
- Also reverts the SyncInferenceCPU marker type from REGION_BASE to
TASK_BASE as the second PR in this series will add the necessary hooks
for asynchronous inferences.

### Tickets:
 - [CVS-179230](https://jira.devtools.intel.com/browse/CVS-179230)

### AI Assistance:
 - *AI assistance used: no*

---------

Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
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.

5 participants