-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[core] Tensor::data member preserve constness of tensor #29594
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
[core] Tensor::data member preserve constness of tensor #29594
Conversation
Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
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.
Looks like we break source compatibility with this change?
Signed-off-by: Raasz, Pawel <[email protected]>
The compilation errors will points where cast of tensor data pointer is done wrong (programing errors: missing const) from this perspective it will break compatibility. To avoid compile errors with current data() member there is a need to introduce new member or overload data with some tag and mark current data() as deprecated or it will work as new implementation of pointer cast, but still there will be get non-const pointer to const tensors. |
Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
### Description - Update casting/getting data pointer from tensor when tensor can return const pointer to data - Use new version of OpenVINO YTokenizers which also contains similar update ### Blocking - openvinotoolkit/openvino#29594 Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
t-jankowski
left a comment
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.
ok for core
Signed-off-by: Raasz, Pawel <[email protected]>
…nstness-in-ov-tensor
Signed-off-by: Raasz, Pawel <[email protected]>
ilya-lavrenov
left a comment
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.
I suppose we cannot merge this PR as is, because it breaks source compatibility (we saw it in GenAI, Tokenizers, OMZ and Contrib).
We need to make this change more smoothly
- returns const pointer for internal build Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
Signed-off-by: Raasz, Pawel <[email protected]>
Details:
Blocked by:
Tickets: