codeplaysoftware / portBLAS

An implementation of BLAS using the SYCL open standard.
Apache License 2.0
250 stars 48 forks source link

FIx error when building with oneAPI release compiler #497

Closed muhammad-tanvir-1211 closed 6 months ago

muhammad-tanvir-1211 commented 7 months ago

This PR fixes an error seen from googlebench and gtest (warning in this case) that explicit comparison with NaN is not allowed in fast precision mode.

pgorlani commented 7 months ago

If the purpose of the patch is removing the warning during the unit test/benchmark compilation, it would be better to set -Wno-tautological-constant-compare in test/CMakeLists.txt and benchmark/portblas/CMakeLists.txt.

-ffp-model=precise flag is an umbrella option that could have side consequences on many aspects since it "disables optimizations that are not value-safe on floating-point data".