Offline Compiler 2012 crashes on whole file and can't compile single kernel

Offline Compiler 2012 crashes on whole file and can't compile single kernel

Imagen de Raistmer

I just installed intel's OpenCL SDK 2012 on Ivy Bridge based Windows 7 x64 PC and trying to perform offline compilation for my OpenCL file.

When I load whole file into offline compiler and try to build it crashes and offers to send report to Microsoft.

When I paste only single kernel into it it refuse to build with next error:

Failed to get platform id...
Build failed!

What is wrong and how it can be fixed?

 

publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Raghu Muthyalampalli (Intel)

"Failed to get platform id..." tells me that there is some problem with your OpenCL installation. Can you install and run gpucaps viewer and let me know what openCL platforms and devices it reports?

Thanks,
Raghu

Imagen de Raistmer

Thanks for suggestion. GPUcaps crashed too.
The reason was remote access through RDP. When I logged on locally Intel Offline compiler started to work.
Why remote access affects Intel OpenCL platform as whole? GPU device should become unavailable indeed, but why block CPU device also ??? Hard crash not the best way to handle remote access sessions...

And another issue:

Using default instruction set architecture.
Intel OpenCL CPU device was found!
Device name: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
Device version: OpenCL 1.1 (Build 31360.31441)
Device vendor: Intel(R) Corporation
Device profile: FULL_PROFILE
:75:9: error: 'M_PI' macro redefinition is not allowed in OpenCL
< stdin >:260:9: note: previous definition is here

Build failed!

My kernels file doesn't include < stdin >
And exactly same file compiled OK in OpenCL platforms of another vendors (AMD, nVidia). Why Intel includes silently ?

Imagen de Raghu Muthyalampalli (Intel)

I am not sure why the offline compilation failed for you. I just tried compiling a cl file though RDP on the CPU and the compilation was successful. I am using SDK 2013, though.

Regarding the second issue, can you attach your kernel here for me to take a look?

Raghu

Imagen de Raistmer

I don't think for that second issue full kernel or full CL file needed.
Here the problem line:

#define M_PI 3.14159265358979323846264338f

When I changed it to:

#if USE_OPENCL_INTEL
//R: Intel SDK includes silently that contains Pi definition
#else
#define M_PI 3.14159265358979323846264338f
#endif

And call CL file build as:
#elif USE_OPENCL_INTEL
strcpy(buildoptions,"-w -DRESULT_SIZE=32 -cl-unsafe-math-optimizations -DUSE_OPENCL_INTEL");
...
err = clBuildProgram(program, 1, &device_id, buildoptions, NULL, NULL);

whole file compiled OK so I can run app on Intel's GPU OpenCL device.
Other platforms need M_PI define...

Inicie sesión para dejar un comentario.