OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

OpenCL GPU compiler fails on valid code

Lubomir_A_
Beginner
133 Views

This code fails to compile when using Intel SDK for OpenCL Applications 2014 with an Intel HD 4000 GPU:

kernel void f1(global double* W)
{
    const double t = 1.;
    min(W[0], t);
}

It complains about the call to min being ambiguous. Changing it to fmin fixes the compilation. The same code compiles fine when targeting the CPU device (Core i7-3820QM), or an NVIDIA GPU.

0 Kudos
1 Reply
Robert_I_Intel
Employee
133 Views

GPU device does not support cl_khr_fp64 currently, so switching to fmin will only help you so much. You should probably switch to floats instead of doubles on the GPU device.

Reply