[Beignet] how about we remove the -ffast-math compiler flag
Lu, Guanqun
guanqun.lu at intel.com
Mon Apr 15 19:52:03 PDT 2013
Hi list,
as our cl runtime doesn't take lots of math heavy computation, how about we release the contraints of using fast-math for our compiler, when I'm compiling beignet using gcc 4.7.3, it has the following errors:
Scanning dependencies of target gbe
[ 1%] Building CXX object backend/src/CMakeFiles/gbe.dir/ocl_stdlib_str.cpp.o
[ 1%] Building CXX object backend/src/CMakeFiles/gbe.dir/ocl_common_defines_str.cpp.o
[ 2%] Building CXX object backend/src/CMakeFiles/gbe.dir/sys/intrusive_list.cpp.o
In file included from /usr/include/math.h:423:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/cmath:46,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/random:38,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/bits/stl_algo.h:67,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/algorithm:63,
from /root/beignet/backend/src/./sys/alloc.hpp:29,
from /root/beignet/backend/src/./sys/platform.hpp:345,
from /root/beignet/backend/src/sys/intrusive_list.hpp:26,
from /root/beignet/backend/src/sys/intrusive_list.cpp:23:
/usr/include/bits/math-finite.h:25:53: error: declaration of 'double acos(double)' has a different exception specifier
In file included from /usr/include/math.h:71:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/cmath:46,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/random:38,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/bits/stl_algo.h:67,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/algorithm:63,
But removing the -ffast-math solves the issue.
If you think this is a good idea, I can send out a simple patch.
Thanks!
--guanqun
More information about the Beignet
mailing list