Skip to content

Conversation

@praasz
Copy link
Contributor

@praasz praasz commented Dec 4, 2025

Details:

  • The tensor can be created as read-only view when input pointer is constant. This kind of tensor can be used as model inputs as model input should be read-only. There is issue to use data() if input tensor is not const object the acquired pointer is not constant which throw exception to indicate that there is intention to modify of read-only tensor.
  • Update core, and plugins to convert tensor object to const when get data pointer to call correct overload
  • Update tests to use read-only tensor for inference on different devices.

Blocked PR:

Tickets:

Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
@praasz praasz added the WIP work in progress label Dec 4, 2025
@praasz praasz requested a review from a team as a code owner December 4, 2025 07:18
@praasz praasz requested review from a team as code owners December 4, 2025 07:18
@github-actions github-actions bot added category: inference OpenVINO Runtime library - Inference category: IE Tests OpenVINO Test: plugins and common category: GPU OpenVINO GPU plugin category: CPU OpenVINO CPU plugin category: TEMPLATE OpenVINO Template plugin category: NPU OpenVINO NPU plugin labels Dec 4, 2025
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
@praasz praasz removed the WIP work in progress label Dec 4, 2025
@praasz praasz added this to the 2026.0 milestone Dec 4, 2025
- public interface check if tensor can write data
- ITensor::data() do not do check to be compatible with current implementation and it is for internal use

Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
@github-actions github-actions bot added category: CPP API OpenVINO CPP API bindings and removed category: TEMPLATE OpenVINO Template plugin labels Dec 5, 2025
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Copy link
Contributor

@t-jankowski t-jankowski left a comment

Choose a reason for hiding this comment

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

ok for core part

Copy link
Contributor

@AlexanderKalistratov AlexanderKalistratov left a comment

Choose a reason for hiding this comment

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

I'm not sure how the issue appeared in the first place. Checks for constants were added to data() method and now it is reverted?

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: CPP API OpenVINO CPP API bindings category: CPU OpenVINO CPU plugin category: GPU OpenVINO GPU plugin category: IE Tests OpenVINO Test: plugins and common category: inference OpenVINO Runtime library - Inference category: NPU OpenVINO NPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants