cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

oriong
Journeyman III

OpenCL compiler for CPU crashes

 

I use the the ATI's sdk to have support for the CPU for my for my MSc thesis and I have encountered crashes at the OpenCL compiler for the CPU.

The minimal case that I have identified as the source of the problem is the code fragment below:

float2 bad(float4 v1, float4 v2)
{
    const float2 ret = {dot(v1, v2), dot(v2, v1)};
    return ret;
}

This is not the actual code but a minimal example that produces the same problem. If I remove the 'const', the compilation continues without problems.

When something like this appears in the source code, the compiler crashes (clc.exe has stopped working) and i get an error code -11 (CL_BUILD_PROGRAM_FAILURE).

I should mention that i use MS Visual Studio 2008 SP1 for the development with the SDK 2.2 and the c++ wrapper API (cl.hpp). 

I tried calling the clc from the command prompt and it again crashed for this minimal test case leaving the message "eok_lvalue_adjust" in the command prompt window. I also tried compiling it in a VBox with ubuntu 10.04 and the SDK 2.3 with simirar results, it segfaulted.

Using the same source on the nVidia driver (as my GPU is a GTX275) seems to work as expected.

Have I encountered a bug in the OpenCL compiler or I am doing something wrong? And even if I do something wrong shouldn't the compiler report a warning or an error instead of crashing? What do you think?

0 Likes
4 Replies
nou
Exemplar

upgrade to SDK 2.3. it might be a fixed.

and proper way to initialize vector variable is (float2)(1,2) construction. not a {}.

0 Likes
oriong
Journeyman III

Thanks for reminding me the proper way to initialise the variable, it works without problems.

But with the crash, do you think I have to send a bug report somwhere (maybe at streamcomputing@amd.com) or my post here is sufficient? As I wrote to my initial post, i also tried the SDK 2.3 and the crash is stil there!

0 Likes

well your example is leading to segfault. but corrected version is compiling fine. well you can send testcase to AMD via email. but i don't know if that address is valid anymore.

0 Likes

The example posted does not crash with the upcoming release. Thanks for posting the kernel.
0 Likes