Skip to content

[Snippets] LoopManager: error-prone code is removed#31952

Merged
v-Golubev merged 7 commits intoopenvinotoolkit:masterfrom
v-Golubev:vg/snippets/reduce_error_prone_code
Sep 4, 2025
Merged

[Snippets] LoopManager: error-prone code is removed#31952
v-Golubev merged 7 commits intoopenvinotoolkit:masterfrom
v-Golubev:vg/snippets/reduce_error_prone_code

Conversation

@v-Golubev
Copy link
Copy Markdown
Contributor

@v-Golubev v-Golubev commented Sep 3, 2025

Details:

  • Removed LoopInfo constructor with vector of ExpressionPort as entries/exits and the corresponding mark_loop helper in LoopManager, since it is unsafe (it set dim_idx=0 for all ports)
  • Removed dim_idx from mark_loop helper with LoopPort entries and exits, since LoopPort already contains dim_idx calue
  • LoopPort::create: removed default value for dim_idx

As a result of error-prone code with non-obvious logic removal, now it's impossible to forget specifying dim_idx for some specific loop port (otherwise, compilation fails) during loops creation, and there are no ways to create loop from expression ports without loop ports creation.

Tickets:

@v-Golubev v-Golubev requested review from a team as code owners September 3, 2025 11:36
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Sep 3, 2025
@v-Golubev v-Golubev added this to the 2025.4 milestone Sep 3, 2025
@v-Golubev
Copy link
Copy Markdown
Contributor Author

@aobolensk Could you please take a look? Thanks in advance

@v-Golubev v-Golubev enabled auto-merge September 4, 2025 09:04
@v-Golubev v-Golubev added this pull request to the merge queue Sep 4, 2025
Merged via the queue into openvinotoolkit:master with commit cf73a96 Sep 4, 2025
220 of 222 checks passed
@v-Golubev v-Golubev deleted the vg/snippets/reduce_error_prone_code branch September 4, 2025 12:57
praasz pushed a commit to praasz/openvino that referenced this pull request Sep 8, 2025
…31952)

### Details:
- *Removed `LoopInfo` constructor with vector of `ExpressionPort` as
entries/exits and the corresponding `mark_loop` helper in `LoopManager`,
since it is unsafe (it set `dim_idx=0` for all ports)*
- *Removed `dim_idx` from `mark_loop` helper with `LoopPort` entries and
exits, since LoopPort already contains `dim_idx` calue*
 - *`LoopPort::create`: removed default value for `dim_idx`*

As a result of error-prone code with non-obvious logic removal, now it's
impossible to forget specifying `dim_idx` for some specific loop port
(otherwise, compilation fails) during loops creation, and there are no
ways to create loop from expression ports without loop ports creation.

### Tickets:
 - *prerequisite for CVS-172631*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CPU OpenVINO CPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants