cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

clBuildProgram crashes on some AMD GPU with OpenCL 2.0 support.

Hi!

I'm using HelloWorld example from APP SDK 3.0 with your OpenCL compute program(Particles.cl), during calling clBuildProgram crash happens in amdocl.dll.

The list of GPU where  problem was found:

GPU  AMD R5 Graphics(Notebook), AMD Radeon (TM) R9 380 Series (OpenCL 1.2 AMD-APP (2348.3)  Radeon Software Version 17.1.1)

Minimal problem code: (From HelloWorld example APP SDK 3.0):

status=clBuildProgram(program, 1,devices,NULL,NULL,NULL); // crash

Screenshot from system where problem was found:

pastedImage_3.png

On AMD R7 240, Intel HD 4000, nVidia 8600GT, nVidia 210 GT it works fine!, final result with same OpenCL Program(Particles.cl😞

pastedImage_12.png

I attached modified sample program(for test) from APP SDK HelloWorld and separate Particles.cl, please check Particles.cl program in attached archive or use separate attached file.

This is driver bug or not ?

Thanks AMD!

0 Likes
6 Replies
dipak
Staff

Hi Andrey,

Thanks for reporting this. I was able to reproduce the issue. After a quick test, it seems that attached kernel is working fine on SI cards (e.g. R7 240), however generating a segfault on CI+ cards (e.g. R9 380 Tonga). I'll verify it further and open a ticket if required.

Regards,

Hi dipak,

Thank, I  will be waiting of responce!

0 Likes

Hi Andrey,

It looks like a compiler issue and a ticket has been opened against the issue. Once I've any update, I'll share with you.

Regards,

Hi Andrey,

Here is a good news. The compiler team has found the root of the crash and already fixed it. Please use the below workaround until the fix is publicly available.

Workaround:

Use string literal as a format argument of printf. Compiler was unable to track constant expression if format is defined as a variable. That is, replace "format" variable by string literal as shown below:

__constant char* format = (__constant char *)"Particle width %f height %f pos %f %f %f"

        "totalTimeAlive %f timeAlive %f\n";

    printf(format, particle.Width, particle.Height, particle.position.x, particle.position.y, particle.position.z, particle.totalTimeAlive, particle.timeAlive);

printf((__constant char *)"Particle width %f height %f pos %f %f %f"

        "totalTimeAlive %f timeAlive %f\n", particle.Width, particle.Height, particle.position.x, particle.position.y, particle.position.z, particle.totalTimeAlive, particle.timeAlive);

Hi dipak!

It is working on R9 380 Series!

Thanks!

0 Likes

Thank you for the confirmation.

Regards,