Skip to content

Conversation

vshampor
Copy link
Contributor

@vshampor vshampor commented Oct 6, 2025

Ticket: 173520

@github-actions github-actions bot added the category: Core OpenVINO Core (aka ngraph) label Oct 6, 2025
@vshampor vshampor force-pushed the adaptive_rkv_reference branch 2 times, most recently from 6581f58 to 370153b Compare October 8, 2025 10:32
@vshampor vshampor marked this pull request as ready for review October 8, 2025 11:04
@vshampor vshampor requested a review from a team as a code owner October 8, 2025 11:04
@vshampor vshampor force-pushed the adaptive_rkv_reference branch from 664b7d6 to 4401b8c Compare October 8, 2025 11:04
@vshampor vshampor requested a review from l-bat October 8, 2025 11:04
@vshampor vshampor force-pushed the adaptive_rkv_reference branch from 4401b8c to 4de52d3 Compare October 8, 2025 13:30
Comment on lines +216 to +213
std::shared_ptr<T[]> allocate_buf(const Shape& shape) {
return std::shared_ptr<T[]>(new T[ov::shape_size(shape)]);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can std::shared_ptr<T[]> be replaced with std::vector<T> to simplify the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, but I wouldn't say that this simplifies the code. I could probably use std::vector<T>::clear instead of std::shared_ptr<T[]>::reset to release memory of unneeded buffers, but I would also need to use shrink_to_fit afterwards, which is by the way not guaranteed to release memory at all.

@vshampor vshampor force-pushed the adaptive_rkv_reference branch from cd1c053 to 223b2d4 Compare October 9, 2025 08:55
@vshampor vshampor requested a review from l-bat October 9, 2025 08:58
@vshampor vshampor force-pushed the adaptive_rkv_reference branch from 223b2d4 to ef12386 Compare October 9, 2025 11:38
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants