project(PERFORMANCE_WITH_NAN) cmake_minimum_required(VERSION 3.0) include(${CMAKE_SOURCE_DIR}/Examples/1-HadamardProduct/multiplePerfTest.cmake) set(CONFIG_SGEMM "16, 32, 64, 112") set(NAN_DEF "std::numeric_limits::signaling_NaN()") set(INF_DEF "std::numeric_limits::infinity()") set(DENORM_DEF "std::numeric_limits::denorm_min()") set(MIN_TO_DENORM_DEF "std::numeric_limits::min()") set(SGEMM_BASE_SRC sgemm_base.cpp main_sgemm.cpp) set(SGEMM_SWAP_SRC sgemm_swap.cpp main_sgemm.cpp) set(SGEMM_VECTORIZE_SRC sgemm_vectorize.cpp main_sgemm.cpp) set(SGEMM_INTRINSICS_SRC sgemm_intrinsics.cpp main_sgemm.cpp) multiplePerfTestLogX("sgemmBase" sgemm base "" "${CONFIG_SGEMM}" ${SGEMM_BASE_SRC}) multiplePerfTestLogX("sgemmSwap" sgemm swap "" "${CONFIG_SGEMM}" ${SGEMM_SWAP_SRC}) multiplePerfTestLogX("sgemmVectorize" sgemm vectorize "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_VECTORIZE_SRC}) multiplePerfTestLogX("sgemmIntrinsics" sgemm intrinsics "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_INTRINSICS_SRC}) phoenix_plotPerfLogX("cmpSgemmSafe03" sgemm_base_O3 sgemm_swap_O3 sgemm_vectorize_O3 sgemm_intrinsics_O3) phoenix_plotPerfLogX("cmpSgemmSafe0fast" sgemm_base_Ofast sgemm_swap_Ofast sgemm_vectorize_Ofast sgemm_intrinsics_Ofast) multiplePerfTestValueLogX("sgemmBaseNanO3" sgemm base nan -O3 "${NAN_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_BASE_SRC}) multiplePerfTestValueLogX("sgemmSwapNanO3" sgemm swap nan -O3 "${NAN_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_SWAP_SRC}) multiplePerfTestValueLogX("sgemmVectorizeNanO3" sgemm vectorize nan -O3 "${NAN_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_VECTORIZE_SRC}) multiplePerfTestValueLogX("sgemmIntrinsicsNanO3" sgemm intrinsics nan -O3 "${NAN_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_INTRINSICS_SRC}) multiplePerfTestValueLogX("sgemmBaseInfO3" sgemm base inf -O3 "${INF_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_BASE_SRC}) multiplePerfTestValueLogX("sgemmSwapInfO3" sgemm swap inf -O3 "${INF_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_SWAP_SRC}) multiplePerfTestValueLogX("sgemmVectorizeInfO3" sgemm vectorize inf -O3 "${INF_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_VECTORIZE_SRC}) multiplePerfTestValueLogX("sgemmIntrinsicsInfO3" sgemm intrinsics inf -O3 "${INF_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_INTRINSICS_SRC}) multiplePerfTestValueLogX("sgemmBaseDenormO3" sgemm base denorm -O3 "${DENORM_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_BASE_SRC}) multiplePerfTestValueLogX("sgemmSwapDenormO3" sgemm swap denorm -O3 "${DENORM_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_SWAP_SRC}) multiplePerfTestValueLogX("sgemmVectorizeDenormO3" sgemm vectorize denorm -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_VECTORIZE_SRC}) multiplePerfTestValueLogX("sgemmIntrinicsDenormO3" sgemm intrinsics denorm -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_INTRINSICS_SRC}) multiplePerfTestValueLogX("sgemmBaseDenormDazO3" sgemm base denormDaz -O3 "${DENORM_DEF}" "-mfpmath=sse" "${CONFIG_SGEMM}" ${SGEMM_BASE_SRC}) multiplePerfTestValueLogX("sgemmSwapDenormDazO3" sgemm swap denormDaz -O3 "${DENORM_DEF}" "-mfpmath=sse" "${CONFIG_SGEMM}" ${SGEMM_SWAP_SRC}) multiplePerfTestValueLogX("sgemmVectorizeDenormDazO3" sgemm vectorize denormDaz -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION} ${DENORM_DAZ_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_VECTORIZE_SRC}) multiplePerfTestValueLogX("sgemmIntrinicsDenormDazO3" sgemm intrinsics denormDaz -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION} ${DENORM_DAZ_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_INTRINSICS_SRC}) multiplePerfTestValueLogX("sgemmBaseMakeDenormO3" sgemm base make_denorm -O3 "${MIN_TO_DENORM_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_BASE_SRC}) multiplePerfTestValueLogX("sgemmSwapMakeDenormO3" sgemm swap make_denorm -O3 "${MIN_TO_DENORM_DEF}" "" "${CONFIG_SGEMM}" ${SGEMM_SWAP_SRC}) multiplePerfTestValueLogX("sgemmVectorizeMakeDenormO3" sgemm vectorize make_denorm -O3 "${MIN_TO_DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_VECTORIZE_SRC}) multiplePerfTestValueLogX("sgemmIntrinicsMakeDenormO3" sgemm intrinsics make_denorm -O3 "${MIN_TO_DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SGEMM}" ${SGEMM_INTRINSICS_SRC})