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

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
s-Nick committed Apr 29, 2024
1 parent b83d329 commit 7b2c73a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ if (INSTALL_HEADER_ONLY)
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM") AND NOT
(${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")
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
6 changes: 4 additions & 2 deletions cmake/Modules/FindDPCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ function(add_sycl_to_target)
"${multi_value_args}"
${ARGN}
)
# Cmake identifies as IntelLLVM compiler only those distributed with intel oneAPI releases,
# so this flag doesn't apply to intel/llvm open source compiler.
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 )
message(STATUS "Adding -fno-fast-math -mllvm -loopopt=0 to target ${SB_ADD_SYCL_TARGET}")
target_compile_options(${SB_ADD_SYCL_TARGET} PRIVATE -mllvm=-loopopt=0)
message(STATUS "Adding -fno-fast-math -mllvm=-loopopt=0 to target ${SB_ADD_SYCL_TARGET}")
endif()
target_compile_options(${SB_ADD_SYCL_TARGET} PUBLIC ${DPCPP_FLAGS})
get_target_property(target_type ${SB_ADD_SYCL_TARGET} TYPE)
Expand Down
2 changes: 2 additions & 0 deletions test/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ 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})

# Cmake identifies compilers as IntelLLVM only those distributed with Intel oneAPI releases,
# so this flag doesn't apply to intel/llvm open source compiler.
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM")
target_compile_options(${test_exec} PRIVATE "-fno-fast-math")
endif()
Expand Down

0 comments on commit 7b2c73a

Please sign in to comment.