AnsweredAssumed Answered

CodeXL failed to debug simple kernel

Question asked by mannyk on Jul 29, 2013
Latest reply on Aug 28, 2013 by urishomroni

I found CodeXL failed to debug my kernel but was able to debug simple kernels from the SDK.  Today I decided to try to narrow it down.  I think I finally figured it out.  CodeXL seems to be unable to handle kernels with more than 3 arguments!

 

I modified the BinarySearch SDK sample with the following kernel

 

_kernel void debugKernel(

    int                    numItems,               /* Total number of items in the batch. */

    __const __global float4*    input,       /* input: float3, float, float3, float. */

    __global int4*        results                /* output: int triangleID, float hitT, int2 padding. */

    , __const __global float4* nodesA     /* not used. */

)

{

    int     tid;                 // thread index.  

    float hitT = 0.f;

 

    tid = get_global_id(0);

    if (tid >= numItems)

        return;

 

    STORE_RESULT( tid, tid, hitT );

}

 

If I comment out 'nodesA' and the corresponding clSetKernelArg in runDebugKernel(), CodeXL will stop at the breakpoint inside 'debugKernel'.  With the unused 4th argument 'nodesA'. I got the following error:

CodeXL-bug1.jpg

 

I can't believe I am the only one trying to pass more than 3 arguments to a kernel.

 

Not being able to debug my OCL kernel make life difficult.

 

I have attached a complete project to help with repo. Thanks.

Attachments

Outcomes