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

Commit

Permalink
Introduce -fno-fast-math also for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
s-Nick committed Apr 29, 2024
1 parent 7b2c73a commit 7917c52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions benchmark/portblas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ foreach(portblas_bench ${sources})
target_link_libraries(bench_${bench_exec} PRIVATE blas::blas)
endif()

# 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(bench_${bench_exec} PRIVATE "-fno-fast-math")
endif()

message(STATUS "Created benchmark: ${bench_exec}")
install(TARGETS bench_${bench_exec}
RUNTIME
Expand Down

0 comments on commit 7917c52

Please sign in to comment.