-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add Adaptive R-KV reference op implementation #32299
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?
Conversation
6581f58
to
370153b
Compare
664b7d6
to
4401b8c
Compare
4401b8c
to
4de52d3
Compare
src/core/reference/include/openvino/reference/adaptive_rkv_diversity.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/adaptive_rkv_diversity.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/adaptive_rkv_diversity.hpp
Show resolved
Hide resolved
std::shared_ptr<T[]> allocate_buf(const Shape& shape) { | ||
return std::shared_ptr<T[]>(new T[ov::shape_size(shape)]); | ||
} |
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.
Can std::shared_ptr<T[]>
be replaced with std::vector<T>
to simplify the code?
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.
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.
src/core/reference/include/openvino/reference/adaptive_rkv_diversity.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/adaptive_rkv_diversity.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/adaptive_rkv_diversity.hpp
Outdated
Show resolved
Hide resolved
cd1c053
to
223b2d4
Compare
223b2d4
to
ef12386
Compare
Ticket: 173520