Repository navigation
Conversation
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
|
@YuriPlyakhin, can you please review as part of dpcpp-spirv-reviewers team? This PR is targeted on the current release, and we would like to create cherry-picks to xmain and xmain-rel and merge them as well today |
There was a problem hiding this comment.
With -ffast-math, what happens when inputs produce Inf or NaN? Is it UB?
E.g. log(0.0), sqrt(-1.0), pow(1.0e30, 1.0e30), etc...
If it is UB, does it make sense to match results there?
Should cases like that be filtered out for the fast-math build?
There was a problem hiding this comment.
nit
Please, consider storing the device output and the expected value and printing them in hex to make triaging failures easier.
bashbaug
left a comment
There was a problem hiding this comment.
Noting for completeness: there are also still some long-standing questions about the required accuracy for OpFMod and OpFRem, especially vs. the fmod and remainder extended instructions.
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
<cmath> header
<cmath> header<cmath> header
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
<cmath> header
Certain users may expect corresponding SYCL and C++ standard-library math functions to produce matching results under floating-point compiler options. This PR makes the following changes to achieve these matching results:
<cmath>wrapper to define most functions inline so they're affected by the floating-point compiler flags.__spirv_ocl_*functions as math built-ins. This preserves the existing behavior when accuracy requirements are specified for the functions.<cmath>built-ins to match their equivalent SYCL built-ins when compiling device code. This includes enabling optimizations when compiling with the-ffast-mathflag.