Hi AMD developpers!
During compiling any OpenCL code with the following strings:
#ifdef cl_amd_printf
#pragma OPENCL EXTENSION cl_amd_printf : enable
#endif
i see the warning report about cl_amd_printf extension:
OpenCL Build log: C:\Users\User\AppData\Local\Temp\\OCL6356T3.cl:2:26: warning: unknown OpenCL extension 'cl_amd_printf' - ignoring
#pragma OPENCL EXTENSION cl_amd_printf : enable
^
1 warning generated.
But, the GPU doesn't support cl_amd_printf(also this extension string are placed between #ifdef and #endif):
OpenCL Device Info:
OpenCL Version OpenCL C 1.2
OpenCL Device Name Bristol Ridge
OpenCL Device Vendor Advanced Micro Devices, Inc.
OpenCL Driver Version 2527.7
OpenCL Device Version OpenCL 1.2 AMD-APP (2527.7)
OpenCL Device Extensions cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store
cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt
cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event cl_amd_liquid_flash
My be The compiler should analize #ifdef cl_amd_printf ?
Solved! Go to Solution.
Thanks for reporting it. As per the above device extension list, cl_amd_printf is already supported. Hence, corresponding #ifdef is also defined.
Regarding the above mentioned warning, I'll check with the compiler team for more information and get back to you.
P.S. Since OpenCL 1.2, printf also works without enabling this extension explicitly.
Regards,
Thanks for reporting it. As per the above device extension list, cl_amd_printf is already supported. Hence, corresponding #ifdef is also defined.
Regarding the above mentioned warning, I'll check with the compiler team for more information and get back to you.
P.S. Since OpenCL 1.2, printf also works without enabling this extension explicitly.
Regards,
Hi dipak, Thanks for your responce
cl_amd_printf is already supported
Ok, I was mistaken
I'll check with the compiler team for more information and get back to you.javascript:;
Ok, i'm will waiting.
P.S. Since OpenCL 1.2, printf also works without enabling this extension explicitly.
Ok, thanks, i will remove it, because i thinks, any AMD GPU should be support at least OpenCL 1.2 minimum
Here is the feedback about the warning.
AMD introduced the printf extension before it made in as a core feature of OpenCL. As a core feature since OpenCL1.2, there is no good reason to enable the AMD extension. Also as a core feature, there is no reason to support it anymore in our newest compiler.
Anyway, even though using pragma issues warning, printf is still supported and works since it is enabled by default.
Hi, dipak, Thanks you!