I am trying to debug an OpenCL kernel translated from a CUDA code. In the CUDA code, I defined a macro:
#define GPUDEBUG(x) printf x
to enable printing under device emulation mode. When I ran the translated unit on ATI stream sdk, I can not find a macro similar to "__DEVICE_EMULATION__".
printf does work when using CPU device, but will crash for GPU devices.
I am curious if there is such a macro so that I can keep my debug approach. Or if there is an alternative?