GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
153 Discussions

Intel(R) Iris(R) Xe Graphics OpenCL runtime complains printf %f with float

FangQ
Beginner
987 Views

I am testing an OpenCL code on Windows 11 with Intel Iris Xe GPU. It complains `printf('%f')` with a float32 variable, see warnings below - I do not see this type of warning on all other OpenCL runtimes I tested

 

1:1645:194: warning: format specifies type 'double' but the argument has type 'float'
            printf("ERROR: should never happen! mediaid=%d idx1d=%X gcfg->doreflect=%d n1=%f n2=%f isdet=%d flipdir[3]=%d p=(%f %f %f)[%d %d %d]\n", mediaid, idx1d, GPU_PARAM(gcfg, doreflect), n1, prop.w, isdet, flipdir.w, p.x, p.y, p.z, flipdir.x, flipdir.y, flipdir.z);
                                                                                          ~~                                                                                                     ^~
                                                                                          %f
1:1645:198: warning: format specifies type 'double' but the argument has type 'float'
            printf("ERROR: should never happen! mediaid=%d idx1d=%X gcfg->doreflect=%d n1=%f n2=%f isdet=%d flipdir[3]=%d p=(%f %f %f)[%d %d %d]\n", mediaid, idx1d, GPU_PARAM(gcfg, doreflect), n1, prop.w, isdet, flipdir.w, p.x, p.y, p.z, flipdir.x, flipdir.y, flipdir.z);
                                                                                                ~~                                                                                                   ^~~~~~
                                                                                                %f

 

I am wondering if the JIT compiler is giving a false alarm here?

0 Kudos
0 Replies
Reply