cancel
Showing results for 
Search instead for 
Did you mean: 

CodeXL

lennox
Adept I

How to debug an opencl 2.0 kernel?

Hi guys,

I want to debug an OpenCL 2.0 kernel. I tried the AMD printf extension and the CODEXL.

However, the CodeXL show the message that opencl2.0 kernels are not supported to debug, and the printf also doesn't work.

Is there any suggestion to debug 2.0 kernel?

Tags (2)
0 Likes
Reply
4 Replies
nibal
Challenger

Re: How to debug an opencl 2.0 kernel?

CodeXL is a strange beast. Uses gdb for debugging, but is far worse 😞

CodeXL supports kernel debugging as follows:

1) You must compile kernel from sources, not binary

2) Go to breakpoints and from the list at left choose "clEnqueueNDRangeKernel"

3) At debug time, clicking in the source code anywhere, will break at that point

HTH

0 Likes
Reply
lennox
Adept I

Re: How to debug an opencl 2.0 kernel?

I tried the way, but the CodeXL will pop a window say OpenCL 2.0 kernels cannot be debugged.

0 Likes
Reply
nibal
Challenger

Re: How to debug an opencl 2.0 kernel?

Sorry about that. Missed the ocl 2.0 requirement. I know it works with ocl

1.2, haven't tried it with ocl 2.0 kernel, though.

I assume you are using latest codeXL.

You can still debug it as ocl 1.2 if you comment out the ocl2.0 calls and

compile it as ocl1.2...

BTW, best ask this question in the CodeXL forum...

0 Likes
Reply
lennox
Adept I

Re: How to debug an opencl 2.0 kernel?

I want to use the fine-grand SVM, only ocl 2.0 supports it, right?

Thanks for your suggestion, I moved the question to the CodeXL board.

0 Likes
Reply