Add support for AVX512-FP16 for vectorizing half precision math

This commit is contained in:
Matthew Sterrett
2022-08-17 18:15:21 +00:00
committed by Rasmus Munk Larsen
parent 76a669fb45
commit 7a3b667c43
7 changed files with 985 additions and 1 deletions

View File

@@ -258,6 +258,12 @@ if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512dq -mfma")
message(STATUS "Enabling AVX512DQ in tests/examples")
endif()
option(EIGEN_TEST_AVX512FP16 "Enable/Disable AVX512-FP16 in tests/examples" OFF)
if(EIGEN_TEST_AVX512FP16)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -mfma -mavx512vl -mavx512fp16")
message(STATUS "Enabling AVX512-FP16 in tests/examples")
endif()
option(EIGEN_TEST_F16C "Enable/Disable F16C in tests/examples" OFF)
if(EIGEN_TEST_F16C)