Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Adding message for header only llibrary usage.
Adding `-fno-fast-math` flag to all tests if compiler is "IntelLLVM"
  • Loading branch information
s-Nick committed Apr 17, 2024
1 parent 0fa81c9 commit 9367097
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ if (INSTALL_HEADER_ONLY)
(${TUNING_TARGET} STREQUAL "INTEL_GPU") )
target_compile_options(portblas INTERFACE -fno-fast-math)
target_compile_options(portblas INTERFACE -mllvm -loopopt=0 )
message(STATUS "Adding -fno-fast-math -mllvm -loopopt=0 to portblas")
endif()
else()
add_subdirectory(src)
Expand Down
11 changes: 1 addition & 10 deletions test/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ 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 @@ -142,9 +135,7 @@ 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})

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

Expand Down

0 comments on commit 9367097

Please sign in to comment.