Skip to content

Commit

Permalink
Disable fast-math for ICC (#1252)
Browse files Browse the repository at this point in the history
We test exact floating point behavior, this can lead to flakyness in the libcu++ test suite
  • Loading branch information
miscco authored Jan 9, 2024
1 parent 8c0bd44 commit 2771c61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libcudacxx/libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ function(cxx_add_warning_flags target)
-Wno-literal-suffix
-Wno-c++14-compat
-Wno-noexcept-type)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_add_compile_flags_if_supported(${target} PRIVATE
-fno-fast-math)
endif()
Expand Down
2 changes: 1 addition & 1 deletion libcudacxx/test/libcudacxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (MSVC)
endif()

# Intel OneAPI compiler has fast math enabled by default which breaks almost all floating point tests
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM")
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
set(LIBCUDACXX_TEST_COMPILER_FLAGS
"${LIBCUDACXX_TEST_COMPILER_FLAGS} \
--compiler-options=-fno-fast-math")
Expand Down

0 comments on commit 2771c61

Please sign in to comment.