You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GPU] Optimize node's memdeps to reduce memory footprints. (#29237)
[GPU] Reduce memory footprint by optimizing node's memdeps.
std::unordered_set<size_t> was originally used as program_node's
memory_dependency and primitive_inst's runtime_memory_dependency for a
better memory pool performance efficiency, however they are less memory
efficient. This optimization takes advantage that runtime memdeps (of
pritimive_inst instances) is initialized from compile stage memdeps (of
program_node instances) and only appends to it during some runtime skip
passes.
### Details:
- [x] Change memdeps set from size_t to uint32_t
- [x] Reserve unordered_set memory in Serializer to reduce memory
overhead of unordered_set when importing from cache_dir
- [x] Reduce unnecessary memory dependencies, such as for constant nodes
- [x] Reduce memory dependencies of ReadValue nodes when they are
optimized out by reusing Variable's memory.
- [x] Split "initial memory dependencies" and "runtime" ones to reduce
overheads in program_node and primitive_instance
### Tickets:
- *CVS-160820, CVS-163673*
0 commit comments