Skip to content

Requiring SSE3 by default #6466

Closed
Closed

Description

@mmcco

OpenCV currently enables the SIMD extension SSE3 by default throughout the build. This breaks the binary for very old AMD64/x86-64 machines; the newest SIMD extension supported by all such machines is SSE2.

There are a few computation-intensive programs that require SSE3 in order to improve performance. This isn't an entirely unreasonable approach because most machines running today support SSE3. However, it does complicate packaging. I don't know of a package manager that filters packages based on hardware extension support, so requiring a non-ubiquitous hardware extension forces package systems to ship non-functional binaries to users with old machines.

However, because OpenCV supplies a CMake option to disable SSE3, all package managers I could find (Debian, Fedora, openSUSE, FreeBSD) do so. We're planning on using it in OpenBSD as well.

The confusing part is that OpenCV already supports SSE3 in the core computation SIMD code, which autodetects hardware extensions using CPUID etc. and chooses the best one. Because of this, enabling SSE3 throughout the build may not be useful.

Do you suspect that you're getting a performance improvement from using SSE3 globally as well as in the core SIMD code? If not, would you consider removing -msse3 from CFLAGS and CXXFLAGS?

Activity

  1. changed the title [-]Inconsistent treatment of SSE3[/-] [+]Requiring SSE3 by default[/+] on Apr 24, 2016
  2. vladimir-dudnik commented on Sep 26, 2019

    @vladimir-dudnik
    Contributor

    is that still not resolved?

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions