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:
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?
upgrade to SDK 2.3. it might be a fixed.
and proper way to initialize vector variable is (float2)(1,2) construction. not a {}.
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!
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.