DPCT1013#

Message#

The rounding mode could not be specified and the generated code may have different accuracy than the original code. Verify the correctness. SYCL math built-in function rounding mode is aligned with OpenCL C 1.2 standard.

Detailed Help#

The rounding mode could not be specified and the generated code may have different accuracy than the original code. Verify the correctness. The SYCL* math built-in functions rounding mode is aligned with the OpenCL C 1.2 standard.

Suggestions to Fix#

Review the logic and adjust it.

For example, this original CUDA* code:

1__global__ void foo(double *res) {
2  double a = 1.00001;
3  double b = 100000000000000000;
4  *res = __dadd_ru(a, b);
5}

results in the following migrated SYCL code:

 1void foo(double *res) {
 2  double a = 1.00001;
 3  double b = 100000000000000000;
 4  /*
 5  DPCT1013:0: The rounding mode could not be specified and the generated code
 6  may have different accuracy than the original code. Verify the correctness.
 7  SYCL math built-in function rounding mode is aligned with OpenCL C 1.2
 8  standard.
 9  */
10  *res = a + b;
11}

which is rewritten to:

1void foo(double *res) {
2  double a = 1.00001;
3  double b = 100000000000000000;
4  *res = a + b; // For precision, use: *res = sycl::nextafter(a + b, (double)INFINITY);
5
6}