Skip to content

Add a CMake flag for disable AVX for OpenVINO - #8920

Merged
maloel merged 2 commits into
realsenseai:developmentfrom
Nir-Az:build_openvino_without_avx
Apr 28, 2021
Merged

Add a CMake flag for disable AVX for OpenVINO#8920
maloel merged 2 commits into
realsenseai:developmentfrom
Nir-Az:build_openvino_without_avx

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Apr 28, 2021

Copy link
Copy Markdown
Collaborator
  • Add LRS CMake flag BUILD_WITH_CPU_EXTENSIONS default = ON (will affect LRS use of CPU extensions in the future)
  • If BUILD_WITH_CPU_EXTENSIONS == OFF disable AVX support for OpenVINO

@Nir-Az Nir-Az changed the title Add a CMake flag for disable AVX for open-vino Add a CMake flag for disable AVX for OpenVINO Apr 28, 2021
@maloel
maloel requested a review from ev-mp April 28, 2021 12:26
Comment thread CMake/lrs_options.cmake Outdated
Comment thread wrappers/openvino/CMakeLists.txt Outdated
Comment thread CMake/lrs_options.cmake
option(FORCE_WINUSB_UVC "Explicitly turn-on winusb_uvc (for win7) backend - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
option(ANDROID_USB_HOST_UVC "Build UVC backend for Android - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
option(CHECK_FOR_UPDATES "Checks for versions updates" ON)
option(BUILD_WITH_CPU_EXTENSIONS "Enable compiler optimizations using CPU extensions (such as AVX)" ON)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The name is misleading as we still use SSE2/SSE3 in default configuration.
We need the additional granularity level and separate AVX,AVX2(512) and may be SSE3 for X86 architecture.
BUILDDISABLE_CPU_EXTENSIONS="AVX2` yo disable itnrinsic of AVX2 and above and then apply it accordingly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As discussed:
I asked to start with BUILD_ to keep in line with the other options.
The granularity is too much for right now, and I don't see the need or ROI at this point in time. We'll change as needed.

@maloel
maloel merged commit bddae60 into realsenseai:development Apr 28, 2021
@Nir-Az
Nir-Az deleted the build_openvino_without_avx branch July 27, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants