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

[GPU][PoC] Common shape info buffer #28167

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

Conversation

dnkurek
Copy link
Contributor

@dnkurek dnkurek commented Dec 20, 2024

Details:

  • Reduce memory usage

Tickets:

  • ticket-id

@dnkurek dnkurek requested review from a team as code owners December 20, 2024 09:56
@dnkurek dnkurek marked this pull request as draft December 20, 2024 09:56
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Dec 20, 2024
@@ -215,6 +216,7 @@ struct network {
bool _is_dynamic = false;
bool _enable_profiling = false;
bool _reset_arguments;
memory::ptr _ptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to hold the pointer to the base buffer in the sub-buffer itself, thus their lifetimes will be better aligned

Comment on lines +926 to +928
void add_offset(size_t offsetPtr) const {
_usm_pointer->_ptr = (void*) ((unsigned char*) _usm_pointer->_ptr + offsetPtr);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably we shouldn't expose this function because it allows shifting the pointer of any UsmMemory. This pointer is also used for free_mem() call, and I'm not sure it will be properly handled if shifted accidently for the not-shared memory buffer. Maybe it would be better to limit shifting only with specialized c-tr like UsmMemory(const cl::UsmHelper& usmHelper, void* usm_ptr, size_t offset = 0), which creates UsmHolder with shared_memory=true option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants