-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[CPU][REF][GatherND]: Support negative indices. #30764
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
base: master
Are you sure you want to change the base?
[CPU][REF][GatherND]: Support negative indices. #30764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This PR introduces support for negative indices in GatherND-8, it is a small backward compatible change, so it has been decided to introduce it within the same op version.
@@ -47,7 +47,7 @@ if ``indices.shape[-1] == data.rank - batch_dims``, else | |||
|
|||
* **1**: ``data`` tensor of type *T*. A tensor of a rank not less than 1. **Required.** | |||
* **2**: ``indices`` tensor of type *T_IND*. A tensor of a rank not less than 1. | |||
It requires all indices from this tensor to be in the range ``[0, s-1]`` where ``s`` is the corresponding dimension to | |||
It requires all indices from this tensor to be in the range ``[-s, s-1]`` where ``s`` is the corresponding dimension to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Optional within this PR, can be discussed/reviewed separately)
As it is an update of behavior within the same op version (GatherND-8), it would be good to add a note with the release version of the change like:
.. note::
Behavior before 2025.3 OpenVINO release: Negative indices were not supported.
Example of similar note for Squeeze-1 #25488,
https://docs.openvino.ai/2025/documentation/openvino-ir-format/operation-sets/operation-specs/shape/squeeze-1.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Details:
Tickets: