cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

givenchy
Journeyman III

problem with printf extention

I wrote a opencl program on kaveri (A10-7850K).

But I want to printf the messages in kernel when I used the type "cl_device_type_gpu" .

I added the "#pragma OPENCL EXTENSION cl_amd_printf  : enable" in kernel code .

It will fail to execute the program.

But when I used cl_device_type_cpu , it worked !!!!

clinfo shows that it could use cl_amd_printf .

The driver version is opencl 2.0 driver and sdk version is 3.0.

Thanks

0 Likes
1 Reply
dipak
Big Boss

It will fail to execute the program.

What type of failure? Doesn't print anything or prints wrong result? Or some other error?

Currently, I don't think cl_amd_printf extension is required any more. It was introduced for earlier drivers.

AFAIK, printf works fine with latest driver and APP SDK. However, as I checked some time ago, there was an issue particularly for OpenCL 2.0 kernel build. If your issue still persists, please provide the test code and mention your setup details.

Regards,

0 Likes