Skip to content

Build error with CMake + DYNAMIC_ARCH=OFF + FMA3: _mm256_fmadd_ps compiled without -mfma (target specific option mismatch) #5535

@toblil

Description

@toblil

Step to reproduce build error:

Host: modern x86_64 with AVX2 + FMA3.

Build: CMake, DYNAMIC_ARCH=OFF (e.g. vcpkg).

Results in GCC errors in sdot_k / _mm256_fmadd_ps due to missing -mfma.

My finding / root cause: commented HAVE_FMA3 block in cmake/cc.cmake.

Suggestion is to uncomment these lines in cmake/cc.cmake:

#	if (HAVE_FMA3)
#set (CCOMMON_OPT  "${CCOMMON_OPT} -mfma")
#endif ()

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