Skip to content

[Snippets] Fix exec_num precision issues in LinearIR expression ordering#31975

Merged
v-Golubev merged 2 commits intoopenvinotoolkit:masterfrom
aobolensk:snippets-exec_num
Sep 4, 2025
Merged

[Snippets] Fix exec_num precision issues in LinearIR expression ordering#31975
v-Golubev merged 2 commits intoopenvinotoolkit:masterfrom
aobolensk:snippets-exec_num

Conversation

@aobolensk
Copy link
Copy Markdown
Contributor

Details:

Improve precision of the execution number assignment in LinearIR::get_inserted_expr_exec_num() by replacing simple arithmetic operations (+1, -1) with std::nextafter() calls. This ensures proper FP precision when determining execution order for inserted expressions, preventing precision issues.

Example:

2.76568e+307 + 1 == 2.76568e+307

Tickets:

@aobolensk aobolensk requested a review from a team as a code owner September 4, 2025 10:38
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Sep 4, 2025
Copy link
Copy Markdown
Contributor

@v-Golubev v-Golubev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@v-Golubev v-Golubev added this to the 2025.4 milestone Sep 4, 2025
@v-Golubev v-Golubev enabled auto-merge September 4, 2025 10:48
The change improves the precision of execution number assignment in `LinearIR::get_inserted_expr_exec_num()` by replacing simple arithmetic operations (+1, -1) with std::nextafter() calls. This ensures proper floating-point precision when
determining execution order for inserted expressions, preventing precision issues.

Example:
```
2.76568e+307 + 1 == 2.76568e+307
```
@v-Golubev v-Golubev added this pull request to the merge queue Sep 4, 2025
Merged via the queue into openvinotoolkit:master with commit 0836071 Sep 4, 2025
233 of 234 checks passed
praasz pushed a commit to praasz/openvino that referenced this pull request Sep 8, 2025
…ing (openvinotoolkit#31975)

### Details:
Improve precision of the execution number assignment in
`LinearIR::get_inserted_expr_exec_num()` by replacing simple arithmetic
operations (+1, -1) with std::nextafter() calls. This ensures proper FP
precision when determining execution order for inserted expressions,
preventing precision issues.

Example:
```
2.76568e+307 + 1 == 2.76568e+307
```

### Tickets:
 - required for openvinotoolkit#31950
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