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

Unable to compile openCL kernel for Xeon Phi: LLVM ERROR

antón_r_
Beginner
216 Views

Hello

When trying to compile a very simple OpenCL kernel.cl on a MIC device, I get the following error: LLVM ERROR: Non implemented constant type

Apparently, the source of the problem is the static array:

__constant _Complex double lookupTable_ipow_pos[4] = { 1, I, -1,-I };

The compilation of the same kernel and the execution on a CPU Xeon device works perfectly.
If I use double or int instead of _Complex double, it also compiles and runs fine, so this LLVM error is triggered exclusively by the _Complex double and the MIC device.

This is the kernel.cl:

#include <complex.h>
#include "ipown.h"
void kernel simple_add(global const _Complex double * A, global const _Complex double* B, global _Complex double* C){   
      C[get_global_id(0)]=A[get_global_id(0)]+B[get_global_id(0)] + ipown(get_global_id(0));                
}                                                                           

And this is ipown.h:

__constant _Complex double lookupTable_ipow_pos[4] = { 1, I, -1,-I };

inline _Complex double ipown( int n )
{
    return lookupTable_ipow_pos[ n % 4 ];
}

Anyone is familiar with this issue?
Thanks in advance.

0 Kudos
3 Replies
Jeffrey_M_Intel1
Employee
216 Views

Which version of runtime are you using, and which Xeon Phi family?

Xeon Phi is only supported in the deprecated 14.2 runtime package (more info on the OpenCL driver page here).   This runtime package only supports the x100 family (Knights Corner).

SvanS
Beginner
216 Views

If I understand correctly, no OpenCL Phi support anymore? 

Jeffrey_M_Intel1
Employee
216 Views

Yes, Xeon Phi OpenCL support is deprecated.  You can still download the runtime package but it is no longer maintained/updated and it doesn't support newer Xeon Phi hardware.

Reply