Skip to content

Processor and OS support AVX512, but GCC doesn't #331

@thezboe

Description

@thezboe

It appears that the configure script checks for AVX512 support. In my case, the OS and processor support, but I have an ancient version of GCC that doesn't yet have the AVX512 options. The configure script correctly determines this:

checking whether AVX512-F is supported by the processor... yes
checking whether AVX512-F is supported by the processor and OS... yes
checking whether C compiler accepts -mavx512f... no
configure: WARNING: Your processor and OS supports AVX512-F instructions but not your compiler, can you try another compiler?
checking whether AVX512-CD is supported by the processor... yes
checking whether AVX512-CD is supported by the processor and OS... yes
checking whether C compiler accepts -mavx512cd... no
configure: WARNING: Your processor and OS supports AVX512-CD instructions but not your compiler, can you try another compiler?
checking whether AVX512-PF is supported by the processor... no
checking whether AVX512-ER is supported by the processor... no
checking whether AVX512-VL is supported by the processor... yes
checking whether AVX512-VL is supported by the processor and OS... yes
checking whether C compiler accepts -mavx512vl... no
configure: WARNING: Your processor and OS supports AVX512-VL instructions but not your compiler, can you try another compiler?
checking whether AVX512-BW is supported by the processor... yes
checking whether AVX512-BW is supported by the processor and OS... yes
checking whether C compiler accepts -mavx512bw... no
configure: WARNING: Your processor and OS supports AVX512-BW instructions but not your compiler, can you try another compiler?
checking whether AVX512-DQ is supported by the processor... yes
checking whether AVX512-DQ is supported by the processor and OS... yes
checking whether C compiler accepts -mavx512dq... no
configure: WARNING: Your processor and OS supports AVX512-DQ instructions but not your compiler, can you try another compiler?
checking whether AVX512-IFMA is supported by the processor... no
checking whether AVX512-VBMI is supported by the processor... no

But, the resulting makefile still tries to use the flags, resulting in error.

gcc -g -O2  -mavx512f  -Wall -fPIC -Wno-deprecated -Wno-deprecated-declarations -I. -Iinclude  -c -o src/libliquid.o src/libliquid.c
gcc: error: unrecognized command line option \u2018-mavx512f\u2019
make: *** [src/libliquid.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions