Forums - Does Adreno 530 GPU SDK support printf function?

6 posts / 0 new
Last post
Does Adreno 530 GPU SDK support printf function?
Gragon
Join Date: 14 Jul 17
Posts: 4
Posted: Wed, 2017-07-26 03:47

Hi all,

    I want to use printf to print some values to debug kernel function. Does anyone know if Adreno GPU 530 supports printf extension?

    I use "clGetDeviceInfo(.., CL_DEVICE_EXTENSIONS, ..)" to get adreno 530 supported extensions and have the following results.

    cl_khr_3d_image_writes cl_img_egl_image cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_egl_event cl_khr_egl_image cl_khr_fp16 cl_khr_gl_sharing 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_image2d_from_buffer cl_khr_mipmap_image cl_khr_srgb_image_writes cl_khr_subgroups cl_qcom_create_buffer_from_image cl_qcom_ext_host_ptr cl_qcom_ion_host_ptr cl_qcom_perf_hint cl_qcom_read_image_2x2 cl_qcom_android_native_buffer_host_ptr cl_qcom_compressed_yuv_image_read cl_qcom_compressed_image

    And i can't find any keyword about printf. Does that mean 530 can't use printf in kernel function to debug? And what way I could use to debug my kernel fuctions?  (Platform: XIAOMI 5, Android 7, by Android ADB SHELL)

  • Up0
  • Down0
Gragon
Join Date: 14 Jul 17
Posts: 4
Posted: Wed, 2017-07-26 03:48

    Thanks for any replies.

  • Up0
  • Down0
Rick Weyrauch
Join Date: 2 Dec 16
Posts: 13
Posted: Wed, 2017-07-26 08:52

The Adreno 530 OpenCL implementation supports kernel printf.   The output is to stdout when run from an adb shell.

-rick

  • Up0
  • Down0
Gragon
Join Date: 14 Jul 17
Posts: 4
Posted: Wed, 2017-07-26 19:21

Hi Rick,

    Thank you so much for your help.

     But I couldn't find what pragma extension can enable printf funtion in Adreno 530 GPU. I only know AMD cl_amd_printf extension and NVIDIA cl_nv_printf extension but don't know Adreno 530 GPU printf extension format. Is that cl_qlcom_printf or others?

     By the way, I also want to know if 530 OpenCL could support double precision and by using what extension to enable? Where could I find detailed informations about 530 OpenCL? I have adreno sdk but there are samples about opengles mostly.

     Thanks again for your time! Waiting for your reply :)

  • Up0
  • Down0
Gragon
Join Date: 14 Jul 17
Posts: 4
Posted: Wed, 2017-07-26 19:46

    I have found that I can use printf directly in my kernel functions to print kernel values. :) Thank you

    But i still want to know if 530 support double precision.

  • Up0
  • Down0
Rick Weyrauch
Join Date: 2 Dec 16
Posts: 13
Posted: Thu, 2017-07-27 08:02

I see you got printf working on the 530.  The kernel printf function is builtin to OpenCL 1.2 and greater.

The Adreno 530 does not support the double precision (cl_khr_fp64) extension.

-rick

 

 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.