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.

Offline compiler crash

Michael_Downey
Beginner
542 Views
Hi,

I am trying to get a program ported to OpenCL and the offline compiler was crashing when I tried to compile it. Here is a stripped down version that still crashes. I tried to attach instead but it seems like the "Add Files" button doesn't work for me. Anyway the example is very simplified and won't really do anything but it still crashes the compiler. Interestingly if you comment out some of the lines inside the for loop in the test kernel it will compile. I'm not too sure how to fix this any help would be appreciated. I am more than likely doing something odd since this is my first attempt at a real OpenCL program.

Machine Information:

CPU: Intel i7 920
OS: Windows 7 64 bit
Compiler: Visual Studio 2008

Also using a test program on Linux I was able to load and compile this program using the AMD OpenCL SDK. Haven't tried doing something similar with the Intel SDK on Windows.

#define MAX_RANGE 16
#define MAX_SOMETHING 65535

// Device function for calculating the minimum cost from an array of costs
unsigned short calcMin(local unsigned short* lineCost)
{
unsigned int tid = get_local_id(0);

for (unsigned int s = MAX_RANGE / 2; s > 0; s >>= 1)
{
if (tid < s)
{
lineCost[tid] = min(lineCost[tid], lineCost[tid + s]);
}

barrier(CLK_LOCAL_MEM_FENCE);
}

return(lineCost[0]);
}

kernel void test()
{
unsigned int prevIndex = 0;
unsigned int currIndex = 1;

// Initialize line cost arrays.
local unsigned short lineCost[2][MAX_RANGE];

local unsigned short minLineCost[2];

unsigned int iStep;
for (iStep = 0; iStep < 8; ++iStep)
{
minLineCost[currIndex] = calcMin(lineCost[currIndex]);

// Commenting this if block out will allow it to compile
if (MAX_SOMETHING == minLineCost[currIndex])
minLineCost[currIndex] = 0;

// Also commenting this one statement out will allow it to compile
currIndex = prevIndex;
}
}
0 Kudos
3 Replies
Shiri_M_Intel
Employee
542 Views
Hi
Which version of the Intel SDK are you using?
Thanks, Shiri
0 Kudos
Michael_Downey
Beginner
542 Views
The latest available: intel_ocl_sdk_1.1_beta_win_x64.exe

Version displayed by the offline compiler: 1.1.0.0
0 Kudos
Shiri_M_Intel
Employee
542 Views
Hi
We were able to re-reproducethe failure. It will be fixed in future releases.
Thnaks, Shiri
0 Kudos
Reply