From 382fdf90ce49003cd04bf74dd1b04c56425b2f4b Mon Sep 17 00:00:00 2001 From: Muhammad Tanvir Date: Fri, 16 Feb 2024 14:24:07 +0000 Subject: [PATCH 1/3] FIx error when building with icpx compiler --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21340430c..71c8fded2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,15 @@ if (MSVC) ) endif() +# set -ffp-model to precise to avoid getting error statement +# in case of icpx compiler: +# explicit comparison with NaN in fast floating point mode [-Werror,-Wtautological-constant-compare] +# https://github.com/dealii/dealii/issues/14693 +string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx) +if(${found_icpx} GREATER -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") +endif() + # By default, tall and skinny Gemm is enabled (for better performance) option(GEMM_TALL_SKINNY_SUPPORT "Whether to enable tall and skinny Gemm" ON) # By default vectorization in gemm kernels is enabled as it imrpove the performance on all Devices. From dcfda55b8fce00aaca60b4978ba7f9bf38efa752 Mon Sep 17 00:00:00 2001 From: Muhammad Tanvir Date: Thu, 22 Feb 2024 12:27:54 +0000 Subject: [PATCH 2/3] Address PR feedback --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71c8fded2..640f2b854 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,13 +83,13 @@ if (MSVC) ) endif() -# set -ffp-model to precise to avoid getting error statement +# update CXX_FLAGS to avoid error when building benchmarks # in case of icpx compiler: # explicit comparison with NaN in fast floating point mode [-Werror,-Wtautological-constant-compare] # https://github.com/dealii/dealii/issues/14693 string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx) -if(${found_icpx} GREATER -1) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") +if(${found_icpx} GREATER -1 AND ${BLAS_ENABLE_BENCHMARK}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=tautological-constant-compare") endif() # By default, tall and skinny Gemm is enabled (for better performance) From 98223aab85fec37a82e0cabf5987222367c54e3b Mon Sep 17 00:00:00 2001 From: Muhammad Tanvir Date: Thu, 22 Feb 2024 15:46:37 +0000 Subject: [PATCH 3/3] Moved the flag update to benchmark/CMakelists.txt file --- CMakeLists.txt | 9 --------- benchmark/portblas/CMakeLists.txt | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 640f2b854..21340430c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,15 +83,6 @@ if (MSVC) ) endif() -# update CXX_FLAGS to avoid error when building benchmarks -# in case of icpx compiler: -# explicit comparison with NaN in fast floating point mode [-Werror,-Wtautological-constant-compare] -# https://github.com/dealii/dealii/issues/14693 -string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx) -if(${found_icpx} GREATER -1 AND ${BLAS_ENABLE_BENCHMARK}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=tautological-constant-compare") -endif() - # By default, tall and skinny Gemm is enabled (for better performance) option(GEMM_TALL_SKINNY_SUPPORT "Whether to enable tall and skinny Gemm" ON) # By default vectorization in gemm kernels is enabled as it imrpove the performance on all Devices. diff --git a/benchmark/portblas/CMakeLists.txt b/benchmark/portblas/CMakeLists.txt index 8cb498ad6..f47e8cccc 100644 --- a/benchmark/portblas/CMakeLists.txt +++ b/benchmark/portblas/CMakeLists.txt @@ -26,6 +26,15 @@ if(BLAS_VERIFY_BENCHMARK) find_package(SystemBLAS REQUIRED) endif() +# update CXX_FLAGS to avoid error when building benchmarks +# in case of icpx compiler: +# explicit comparison with NaN in fast floating point mode [-Werror,-Wtautological-constant-compare] +# https://github.com/dealii/dealii/issues/14693 +string(FIND ${CMAKE_CXX_COMPILER} "icpx" found_icpx) +if(${found_icpx} GREATER -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=tautological-constant-compare") +endif() + set(sources # Level 1 blas blas1/axpy.cpp