-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[CPU] CACHE_DIR hash optimization #25624
[CPU] CACHE_DIR hash optimization #25624
Conversation
3e16126
to
bf875ea
Compare
bf875ea
to
81cdaaf
Compare
81cdaaf
to
8fcb900
Compare
src/core/src/pass/serialize.cpp
Outdated
@@ -131,7 +115,7 @@ class ConstantWriter { | |||
// the same hash for {2, 2} and {0, 128} arrays. | |||
// But even strong hashing algorithms sometimes give collisions. | |||
// Therefore we always have to compare values when finding a match in the hash multimap. | |||
const HashValue hash = hash_combine(ptr_to_write, *new_size); | |||
const HashValue hash = ov::runtime::combine_hash(ptr_to_write, *new_size); |
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.
- does this function provide the same results as original
hash_combine
? - If yes, could you please add such tests? It's important to preserve the same results for hashes to avoid regeneration of compiled_blobs on customers side with newer OpenVINO release.
- What performance gain do you see from this optimization?
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.
If this jit implement for hash computation is good enough, can we also extend to other component's hash computation? As we know, there are many duplicated similar combine_hash functions, such as in compilation_context.cpp
, ov::util::hash_combine
, ov::snippets::pass::<unnamed>::hash_combine()
, can we merge them into a single version?
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.
Ilya,
- No, that is another approach,
- Cache is recompiled on each commit change, due to
openvino_version
andruntime_info
contain commit hash, - Please take a look at file
Compile_model_time_cache_HASH_FIX_branch_vs_master.xlsx
in the ticket 127331.
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.
River,
It's good point for further optimizations.
src/core/reference/include/openvino/reference/utils/combine_hash.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/utils/registers_pool.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/utils/registers_pool.hpp
Outdated
Show resolved
Hide resolved
src/core/reference/include/openvino/reference/utils/registers_pool.hpp
Outdated
Show resolved
Hide resolved
src/core/src/pass/serialize.cpp
Outdated
@@ -131,7 +115,7 @@ class ConstantWriter { | |||
// the same hash for {2, 2} and {0, 128} arrays. | |||
// But even strong hashing algorithms sometimes give collisions. | |||
// Therefore we always have to compare values when finding a match in the hash multimap. | |||
const HashValue hash = hash_combine(ptr_to_write, *new_size); | |||
const HashValue hash = ov::runtime::combine_hash(ptr_to_write, *new_size); |
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.
If this jit implement for hash computation is good enough, can we also extend to other component's hash computation? As we know, there are many duplicated similar combine_hash functions, such as in compilation_context.cpp
, ov::util::hash_combine
, ov::snippets::pass::<unnamed>::hash_combine()
, can we merge them into a single version?
8fcb900
to
e580c88
Compare
e580c88
to
b6d7d1d
Compare
This PR will be closed in a week because of 2 weeks of no activity. |
343cfc8
to
35a0d2e
Compare
d9134d7
to
5218283
Compare
5218283
to
0f3a16a
Compare
This reverts commit 5f4a445.
Details:
Tickets: