4 Replies Latest reply on Feb 4, 2018 6:57 AM by Andrey2007AMD

    Why OpenCL compiler produced warning ?

    Andrey2007AMD

      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 ?