5 Replies Latest reply on May 18, 2011 5:13 PM by rick.weber

    Why isn't printf supported on all GPUs?

    rick.weber

      According to the OpenCL documentation, cl_amd_printf is supported by Radeon 5000+ cards. When I run my application on my 5870, nothing prints. When I run it on my CPU, it does. This is about what I would expect because GPUs can't access file descriptors to write to the terminal. As such, I think printf() is a nop on the GPU.

      However, in the programming guide, it says printf isn't supported on the Radeon 4000 series cards. Why is that if printf doesn't do anything? I suppose you theoretically could do printf on a GPU, writing the string directly to a host buffer from the kernel and then the CPU prints that, but I think ATI hardware has supported writes to host memory since RV600, which wouldn't explain why you can't do it with RV700.