Skip to content

build: AVX512 support #8974

Closed
Closed

Description

@alalek

Currently AVX512 support is broken and builds fail with enabled compiler option. Message is:

opencv/modules/core/src/system.cpp(488): error: identifier "CV_CPU_AVX512" is undefined
          int baseline_features[] = { CV_CPU_BASELINE_FEATURES };

On AVX512 capable machine:

cmake -DCPU_BASELINE=DETECT <...>

or on other x86 machine:

cmake -DCPU_BASELINE=AVX512 <...>

Problem explanation

Current CMake scripts are designed for support "atomic" instruction sets (like, AVX512DQ) which has 1:1 mapping to compiler flags / processor features.

Groups, like AVX512 are not properly supported for now. Perhaps AVX512 can be replaced with AVX512-KNL (Knights Landing), AVX512-SKL (Skylake with BW, DQ, VL), AVX512-CNL (CannonLake with additional IFMA, VBMI) groups. But I'm not sure that it is a good idea.
BTW, Intel compiler defined this flag "COMMON-AVX512", "MIC-AVX512", "CORE-AVX512" (DQ is here)

So probably we should start from atomic features. Groups can be added later.

Activity

  1. alalek commented on Feb 20, 2018

    @alalek
    MemberAuthor

    CMake: -DCPU_BASELINE=AVX512_SKX
    OpenCV runtime (dispatched): OPENCV_CPU_DISABLE=AVX512-SKX

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions