cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sonkanit
Journeyman III

printf doesn't work with stream sdk 2.1

I am not sure if it's because of my 10.3b driver. I can't update the driver on my laptop.

 

When I use printf in cl program, the compiler says "error: printf declared implicitly"

 

Any sugguestions? Thanks

0 Likes
5 Replies
LeeHowes
Staff

I don't think printf is supported at the moment is it?

0 Likes

It was supported on CPU device and on 2.0.1.

Anyone please check if it is still working on 2.1?

0 Likes

Right, I've done some badgering. Apparently to ensure clean standard support, as the printf support is not a standard feature of OpenCL, as of 2.1 you have to enable it as an extension. Put the following in your cl code:

#pragma OPENCL EXTENSION cl_amd_printf : enable

 

0 Likes

Thank you very much LeeHowes. I supposed this is also written somewhere in the document. All my fault.

 

0 Likes

No problem. Normal people don't read release notes any more than we read user manuals, so it's not surprising

0 Likes