vetter / shoc

The SHOC Benchmark Suite
Other
243 stars 104 forks source link

Remove redundant -cl-unsafe-math-optimizations option. #73

Open dfukalov opened 3 years ago

dfukalov commented 3 years ago

OpenCL spec (https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clBuildProgram.html) says that "cl-unsafe-math-optimizations" option allows a lot of optimizations and generated source code of Add tests can be completely optimized out. E.g.

s0=10.f-s0;
s0=10.f-s0;

can be optimized to

s0=s0;

when -cl-unsafe-math-optimizations is specified. At least clang compiler started to eliminate this code a time ago.

It seems for this trivial test the option should be removed in order to avoid such optimizations.