You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL][FE][Driver] Implement floating point accuracy control (#8280)
This patch implements the accuracy controls for floating-point math
functions in DPC++. Using the -ffp-accuracy command line option, the
user can request an accuracy level for all math functions or for
specific ones. Calls to fpbuiltin intrinsics llvm.fpbuilin.* are then
generated.
Syntax:
Linux: -ffp-accuracy=[default|value][:funclist]
Windows: /Qfp-accuracy:[default|value][:funclist]
funclist is an optional comma separated list of math library functions.
-ffp-accuracy=[default|value]
default: Use the implementation defined accuracy for all math library
functions.
This is equivalent to not using this option.
value: Use the defined standard accuracy for what each accuracy value
means for all math library functions.
-ffp-accuracy=[default|value][:funclist]
default: Use the implementation defined accuracy for the math library
functions in funclist.
This is equivalent to not using this option.
value: Use the defined standard accuracy for what each accuracy value
means for the math library functions in funclist.
value is one of the following values denoting the library function
accuracy.
high This is equivalent to max-error = 1.0.
medium This is equivalent to max-error = 4.
low This is equivalent to accuracy-bits = 11 for single-precision
functions.
accuracy-bits = 26 for double-precision functions.
sycl Determined by the OpenCL specification for math function accuracy:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#relative-error-as-ulps
cuda Determined by standard
https://docs.nvidia.com/cuda/cuda-c-programming-guide/#mathematical-functions-appendix
0 commit comments