openvinotoolkit / openvinotoolkit/npu_compiler
[Performance] Avoid repeated sorting in AsyncDepsInfo dependency queries
Nobody has claimed this yet.
- Dominant language
- MLIR
- Stars
- 100
- Forks
- 50
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 1
Description
Problem
getOpDeps() and getConsumerOps() repeatedly copy and sort the same dependency sets. This adds noticeable compile time for large models such as Qwen2.5-7B.
Proposed change
Cache the sorted dependency and consumer lists. Clear only the affected cache entry when dependencies change.
Acceptance criteria
- Keep the current sorted output and public API.
- Correctly update the cache after all dependency changes.
- Handle duplicate dependencies safely.
- Pass focused and full unit tests.
- Verify correctness with a real model compile.
- Show a repeatable improvement on latest upstream.
- Document the memory cost.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AsyncDepsInfo::getOpDeps() and getConsumerOps(), then trace every dependency-change path that can affect their results. Done means sorted output and the public API remain unchanged, focused and full unit tests pass, duplicate dependencies are safe, a real Qwen2.5-7B compile is correct, the improvement is repeatable on latest upstream, and memory cost is documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100