OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

Intel OpenCL SDK 2013 debugger - "-g -s" Build option

Micha_M_
Beginner
460 Views

Hi,

I'm trying to debug an OpenCL kernel using the Intel OpenCL SDK  2013 debugger integrated in VS2010 and Windows 7 64-bit.

The documentation states I have to pass "-g -s
" as an option to clBuildProgram() but this results in a CL_BUILD_ERROR error

I've tried these two options:

1.   m_clStatus = ::clBuildProgram(m_clProgram,

                                  1,

                                  &m_clDeviceId,

                                   "-g -s m:/kernels/My_kernel.cl",

                                   NULL, NULL);

2.   m_clStatus = ::clBuildProgram(m_clProgram,

                                  0,

                                  NULL,

                                   "-g -s m:/kernels/My_kernel.cl",

                                   NULL, NULL);

Is it correct?   

The compilation succeed if the target device is IGPU.

Thanks, 
Micha 

0 Kudos
4 Replies
Raghupathi_M_Intel
460 Views

The fourth option to clBuildProgram() specifies the build options. So you should be passing "-g -s" and you don't need the "m:/kernels/My_kernel.cl" string.

Raghu

0 Kudos
Micha_M_
Beginner
460 Views

Thank you,

Do you mean

 m_clStatus = ::clBuildProgram(m_clProgram,

                                  1,

                                  &m_clDeviceId,

                                   "-g -s",

                                   NULL, NULL);

This command returns error code -43 (= CL_INVALID_BUILD_OPTIONS).

 

Thanks, 
Micha 

 

0 Kudos
Yuri_K_Intel
Employee
460 Views
Hi Micha, Actually, you need to specify full path to your kernel in -s option, so please pass "-g -s m:/kernels/My_kernel.cl" for build options. Please also make sure that you create a context with CPU device only, since debugging doesn't work for GPU device currently. Here is documentation http://software.intel.com/sites/products/documentation/ioclsdk/2013/UG/Debugging_Your_OpenCL_Kernel_with_Intel_SDK_for_OpenCL_Debugger.htm In case you still have a problem, please attach a small reproducer. Thanks, Yuri
0 Kudos
Raghupathi_M_Intel
460 Views

Ah, sorry. Yuri is correct you do need the complete path to your kernel. Please post if you are still having trouble after following his suggestions.

Thanks,
Raghu

0 Kudos
Reply