Results 1 to 5 of 5

Thread: Debug OpenCL Kernel ?

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    3

    Debug OpenCL Kernel ?

    Hi,

    I would like to debug my OpenCL Kernel code... so, I have create a 'char array' that I send to my kernel.

    But how can I :
    - Add a string ?
    - Convert int to string ?

    Thanks

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Debug OpenCL Kernel ?

    There are no built-in string methods in OpenCL. You'll have to write them yourself to do so. I would suggest a more primitive approach of using error codes to indicate status and using that instead. Remember that either way you are going to need to make sure that the work-items don't overwrite each other when returning information. Another good approach is to just use the CPU device which (at least on Mac OS X) supports printf().

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    15

    Re: Debug OpenCL Kernel ?

    Hey,

    There is a tool called gDebugger which supports debugging OpenCL kernels. It is in its beta phase and for this time for free

  4. #4
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Debug OpenCL Kernel ?

    I don't know if gDebugger will let you debug kernels or just API calls. Debugging the kernel requires getting access to breakpoints on the device. (These don't exist for GPU hardware, so you would have to use a CPU.)

  5. #5
    Junior Member
    Join Date
    Dec 2011
    Posts
    3

    Re: Debug OpenCL Kernel ?

    You can use this article to debug OpenCL kernel and Java openCL API call:
    http://suhorukov.blogspot.com/2011/12/o ... -host.html

Similar Threads

  1. Replies: 1
    Last Post: 07-29-2012, 10:56 AM
  2. Replies: 7
    Last Post: 12-13-2011, 04:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •