Visible to Intel only — GUID: GUID-0584FCD1-436B-46C3-93AC-D51E8E69062F
Visible to Intel only — GUID: GUID-0584FCD1-436B-46C3-93AC-D51E8E69062F
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:
__global__ void foo(double *res) {
double a = 1.00001;
double b = 100000000000000000;
*res = __dadd_ru(a, b);
}
results in the following migrated SYCL code:
void foo(double *res) {
double a = 1.00001;
double b = 100000000000000000;
/*
DPCT1013:0: 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.
*/
*res = a + b;
}
which is rewritten to:
void foo(double *res) {
double a = 1.00001;
double b = 100000000000000000;
*res = a + b; // For precision, use: *res = sycl::nextafter(a + b, (double)INFINITY);
}