KhronosGroup / SYCL-Docs

SYCL Open Source Specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflicting specification for precision of builtin functions

gmlueck opened this issue · comments

The SYCL 2020 specification has two conflicting statements about the precision guarantees for the builtin functions in section 4.17. The introductory paragraph in that section says:

The expected precision and any other semantic requirements are defined in the backend specification.

However, section 4.17.4 says:

In SYCL the OpenCL math functions are available in the namespace sycl on host and device with the same precision guarantees as defined in the OpenCL 1.2 specification document ch. 7 for host and device. For a SYCL platform the numerical requirements for host need to match the numerical requirements of the OpenCL math built-in functions.

I think this statement in 4.17.4 is an oversight, and we intended to move this to the backend specification for OpenCL.

This would make sense. Otherwise, we would require all backends to have the same precision guarantees as OpenCL (or better), which would make it quite difficult to implement SYCL on other backends.

There is a similar conflicting statement about precision in section 4.17.6:

These functions are implemented with a minimum of 10-bits of accuracy i.e. the maximum error is less than or equal to 8192 ulp.

Again, this statement is duplicated from OpenCL, so I think we intended to move this statement to the OpenCL backend specification.

Agree. Everything should be moved to the backend specification (at minima just to be coherent spec)