Skip to content
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

Override the default isExecutable() method in StringTensorPack-15 #28376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

p-wysocki
Copy link
Contributor

Details:

  • Override the default isExecutable() method in StringTensorPack-15
  • This fixes incorrect packing of empty strings (see reproducer in the ticket)

Tickets:

Signed-off-by: p-wysocki <[email protected]>
Signed-off-by: p-wysocki <[email protected]>
@p-wysocki p-wysocki added this to the 2025.0 milestone Jan 10, 2025
@p-wysocki p-wysocki requested review from a team as code owners January 10, 2025 14:20
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Jan 10, 2025
Copy link
Contributor

@mitruska mitruska left a comment

Choose a reason for hiding this comment

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

The default isExecutable() returns false if any input Tensor has 0 dimension.
As I understand, for StringTensorPack the last input tensor with char values is allowed to be empty, while the output shape is always equal to the shape of the first input, so for such case the output tensor can be non-empty, but contains "" empty strings.
The solution LGTM.

Comment on lines +84 to +87
bool StringTensorPack::isExecutable() const {
return !(isInputTensorAtPortEmpty(0) || isInputTensorAtPortEmpty(1));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It's great that the issue is fixed for the reproducer script, but is it possible to add a unit test to cover such case?

@ilya-lavrenov ilya-lavrenov added the pr: needs tests PR needs tests updating label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin pr: needs tests PR needs tests updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants