cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

be_dos
Adept I

OpenCL compiler SIGSEGV'ing

Hello!

So I've been writhing my OpenCL project until I run into a strange problem: a call to clBuildProgram results in a segmentation fault.

I'm providing a sample code here (see attached archive) that gives a SIGSEGV every single time you try to build it.

In advance: please don't try to understand what this code does, as the sample is not meaningful. It's a cut-down kernel of a meaningful program, with just enough code left to crash the compiler. The goal here is only to demonstrate the bug.

If that matters, I tested under Windows 7 and using OCL SDK Light.

Hope this gets fixed ASAP!

Cheers,

0 Likes
5 Replies
be_dos
Adept I

Adding a very useful piece of information.

Replacing line 59 of main.cpp from my archive with

ret = clBuildProgram(program, 1, &device_id, "-cl-std=CL2.0 -cl-opt-disable", NULL, NULL);

makes the example compile.

That essentially means that the optimization logic in the compiler is flawed.

0 Likes

I've also found two interesting details:

  1. The problem persists when using PAL OpenCL on Linux with AMDGPU 18.50.
  2. When I try to compile the test kernel from the provided archive in CodeXL, it fails for Graphics IP v7 and above. However, compiling for Graphics IP v6 works fine, no matter what optimization level I throw at it.
0 Likes

Thank you for reporting the compilation issue. I was able to reproduce it with CodeXL on Win10. I'll report it to the appropriate team.

Thanks.

Thank You!

Hope this gets fixed ASAP!

0 Likes

A bug ticket has been created against the issue. Once I've any update about it, I'll let you know.

Thanks.

0 Likes