[NPU] Compute hash inside CommandQueueDesc and not in the graph#35104
Merged
pereanub merged 1 commit intoopenvinotoolkit:masterfrom Apr 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Moves command-queue hashing responsibility into CommandQueueDesc (instead of computing it in Graph/DynamicGraph) and updates call sites to use the new encapsulated API.
Changes:
- Added internal hashing utilities and automatic key recomputation to
CommandQueueDesc(via getters/setters). - Simplified
ZeroCmdQueueKeyHashto combine(context, device, desc.key)rather than re-hashing all desc fields. - Updated graphs, wrappers, and unit tests to construct/mutate
CommandQueueDescusing the new interface.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/intel_npu/tests/functional/internal/utils/zero/zero_cmd_queue_pool_tests.hpp | Updates tests to the new CommandQueueDesc constructor/setter API and new invariant enforcement. |
| src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp | Switches CommandQueue creation logic to use CommandQueueDesc getters. |
| src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_wrappers.hpp | Implements hashing/key recomputation inside CommandQueueDesc and encapsulates its fields. |
| src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_cmd_queue_pool.hpp | Simplifies queue key hashing to reuse CommandQueueDesc::key. |
| src/plugins/intel_npu/src/compiler_adapter/src/graph.cpp | Removes manual key recomputation; uses CommandQueueDesc setters. |
| src/plugins/intel_npu/src/compiler_adapter/src/dynamic_graph.cpp | Removes manual key recomputation; uses CommandQueueDesc setters. |
src/plugins/intel_npu/tests/functional/internal/utils/zero/zero_cmd_queue_pool_tests.hpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_wrappers.hpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_wrappers.hpp
Show resolved
Hide resolved
23e30ba to
737db47
Compare
src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_utils.hpp
Outdated
Show resolved
Hide resolved
737db47 to
45f9ef9
Compare
45f9ef9 to
cd67b03
Compare
cd67b03 to
26ba850
Compare
src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_cmd_queue_pool.hpp
Show resolved
Hide resolved
PatrikStepan
approved these changes
Apr 1, 2026
c3193b7 to
ad88d6b
Compare
Signed-off-by: Bogdan Pereanu <bogdan.pereanu@intel.com>
ad88d6b to
db195f9
Compare
sbutnari
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
Tickets:
AI Assistance: