Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Reverting changes in test cmake for icpx compatibility
Browse files Browse the repository at this point in the history
Removing -fno-fast-math from rotmg and rotg tests compilation causes them to
fail.
  • Loading branch information
s-Nick committed Apr 16, 2024
1 parent 5749c0b commit 95aa529
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules/FindDPCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function(add_sycl_to_target)
"${multi_value_args}"
${ARGN}
)
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM") AND NOT
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM") AND NOT
(${TUNING_TARGET} STREQUAL "INTEL_GPU") )
target_compile_options(${SB_ADD_SYCL_TARGET} PRIVATE -fno-fast-math)
target_compile_options(${SB_ADD_SYCL_TARGET} PRIVATE -mllvm -loopopt=0 )
Expand Down
11 changes: 9 additions & 2 deletions test/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ if(is_dpcpp)
endif()


# Contains tests that fail if compiled with -ffast-math
set(SYCL_UNITTEST_NOFASTMATH
${PORTBLAS_UNITTEST}/blas1/blas1_rotg_test.cpp
${PORTBLAS_UNITTEST}/blas1/blas1_rotmg_test.cpp
)

if(GEMM_TALL_SKINNY_SUPPORT)
list(APPEND SYCL_UNITTEST_SRCS ${PORTBLAS_UNITTEST}/blas3/blas3_gemm_tall_skinny_test.cpp)
endif()
Expand Down Expand Up @@ -136,8 +142,9 @@ foreach(blas_test ${SYCL_UNITTEST_SRCS})
target_link_libraries(${test_exec} PRIVATE gtest_main Clara::Clara blas::blas portblas)
target_include_directories(${test_exec} PRIVATE ${CBLAS_INCLUDE} ${PORTBLAS_COMMON_INCLUDE_DIR})

if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM") AND NOT
(${TUNING_TARGET} STREQUAL "INTEL_GPU") )
list (FIND SYCL_UNITTEST_NOFASTMATH ${blas_test} _index)
if (${_index} GREATER -1 OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM" AND
TUNING_TARGET IN_LIST non_intel_target))
target_compile_options(${test_exec} PRIVATE "-fno-fast-math")
endif()

Expand Down

0 comments on commit 95aa529

Please sign in to comment.