Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPP: cv::ipp::getIppTopFeatures() return value on 32-bit configurations #12959

Open
alalek opened this issue Oct 26, 2018 · 9 comments
Open

IPP: cv::ipp::getIppTopFeatures() return value on 32-bit configurations #12959

alalek opened this issue Oct 26, 2018 · 9 comments

Comments

@alalek
Copy link
Member

alalek commented Oct 26, 2018

Windows 32-bit:

Intel(R) IPP version: ippIP SSE4.2 (p8) 2019.0.0 Gold (-) Jul 26 2018

cv::ipp::getIppTopFeatures() returns 0x8000 (ippCPUID_AVX2).
It should be 0x80 (ippCPUID_SSE42) because SSE4.2 backend is used.

relates #12877

@alalek
Copy link
Member Author

alalek commented Oct 26, 2018

/cc @maver1 @lupustr3

@alalek
Copy link
Member Author

alalek commented Dec 2, 2020

The same problem exists with IPPICV on MacOSX.
relates #18986

/cc @eplankin

@eplankin
Copy link
Contributor

@alalek, what SSE4.2 backend means? Is it the machine or code that was dispatched?
which machine was used, avx2 or sse4.2?
I was able to reproduce the similar problem on avx2 machine - getCpuFeatures() results in avx2 that is right but getLibVersion() results in sse4.2 instead of avx2. Trying to find out if these issues are the same...

@alalek
Copy link
Member Author

alalek commented Feb 25, 2022

Nightly build reports no such issue anymore (workaround result is reported):

CPU features: SSE SSE2 *SSE4.1 *SSE4.2 *FP16 *AVX
Intel(R) IPP version: ippIP SSE4.2 (p8) 2020.0.0 Gold (-) Oct 21 2019
Intel(R) IPP features code: 0x80

Perhaps update to 2020.0.0 fixes it: #16639

@eplankin
Copy link
Contributor

@alalek, shouldn't #18991 be reverted then?

@alalek
Copy link
Member Author

alalek commented Mar 24, 2022

Need to check....

Unfortunately reported value is after this workaround:

  • Win32: [ INFO:0@0.002] IPP: replacing ippTopFeatures=00008000 => SSE4.2

So, this issue is not fixed yet.

@eplankin
Copy link
Contributor

Then I need more information.
what SSE4.2 backend means? Is it the machine or code that was dispatched?
which machine was used, avx2 or sse4.2?
I was able to reproduce the similar problem on avx2 machine - getCpuFeatures() results in avx2 that is right but getLibVersion() results in sse4.2 instead of avx2. Trying to find out if these issues are the same...

@alalek
Copy link
Member Author

alalek commented Mar 25, 2022

Reproducible on:

  • Windows 10 on Skylake machine. Build of 32-bit binaries.
  • Or macOS X (64-bit).

what SSE4.2 backend means?

Not sure about IPP terminology, but I mean code path to execute SSE4.2 optimizations.
ippiGetLibVersion()->Name returns SSE4.2.
ippGetEnabledCpuFeatures() returns AVX2 - which is not available (IPPICV doesn't have AVX2 optimizations for 32-bit build to reduce code size).

@eplankin
Copy link
Contributor

Due to an implementation of IPP dispatcher, ippGetEnabledCpuFeatures() returns all features that are supported on CPU except those which were manually disabled. Optimizations which the library contains (AVX2, SSE4.2, etc.) are not taken into account. As far as I understand, ippTopFeatures is used to define an optimization branch in IPP.
So the only way to know which optimization branch has been chosen is parsing of ippiGetLibVersion() ouput (ippiGetLibVersion()->Name).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants