Skip to content

Conversation

sgbihu
Copy link
Contributor

@sgbihu sgbihu commented Sep 1, 2025

Details:

  • Current Abs operator's implementation
  1. Convert int32 to float
  2. Apply sign mask
  3. Convert float to int32

Step 3 will result in a precision loss.

Tickets:

@sgbihu sgbihu requested review from a team as code owners September 1, 2025 06:16
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Sep 1, 2025
@sgbihu sgbihu requested review from aobolensk, azhai219 and Copilot and removed request for a team September 1, 2025 06:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes precision loss in the absolute value (abs) operator for integer data types by replacing the DNNL-based implementation with a custom JIT emitter that handles integer precision natively.

  • Replaces jit_dnnl_aux_emitter with a dedicated jit_abs_emitter to avoid float conversion precision loss
  • Implements direct integer absolute value operations using CPU-specific SIMD instructions (pabsd/vpabsd)
  • Adds test coverage for the abs operator with integer precision

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
activation.cpp Adds abs operator to integer activation types test list
jit_uni_eltwise_generic.cpp Updates emitter mapping to use new jit_abs_emitter
jit_eltwise_emitters.hpp Declares new jit_abs_emitter class
jit_eltwise_emitters.cpp Implements jit_abs_emitter with ISA-specific optimizations
jit_dnnl_ext_emitters.hpp Removes old jit_abs_emitter class definition

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@maxnick maxnick added this to the 2025.4 milestone Sep 2, 2025
@maxnick
Copy link
Contributor

maxnick commented Sep 2, 2025

@aobolensk , could you please take a look?

@maxnick maxnick added this pull request to the merge queue Sep 3, 2025
Merged via the queue into openvinotoolkit:master with commit c146212 Sep 3, 2025
248 of 254 checks passed
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.

4 participants