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.
1663 Discussions

Code Builder Kernel Analysis errors

Colin_Reinhardt
Beginner
167 Views

 

When I create a brand new Code Builder session, using a simple vector Add kernel, Build works fine. 

 __kernel void Add_1D(__global int* pA, __global int* pB, __global int* pC)
{
    const int id    = get_global_id(0);

    pC[id] = pA[id] + pB[id];
}

 

Then I set  up buffer variables and run Analyze, which also works, at least the Session Info, Execution Analysis (Execution and Advanced).

Using global_work_size = {65536,0,0} and local_work_size = (32,0,0)

However, If I mouse over the Kernel Analysis option, and select a configuration, then Launch Analysis,

it runs for a bit then says "Analysis has encountered errors." and quits. How can I troubleshoot this? 

Thx, Colin

 

0 Kudos
5 Replies
Not applicable
167 Views

Hi Colin.

I tried your kernel and it worked for me, so to understand what the error please provide more info by following these steps:

1) in the "Code Builder Session Explorer" view, right click on the HTML report and "Open Containing Folder".
2) open the HTML in an external browser (Firefox is preferred) and go to the "Kernel Analysis" drop menu and choose your kernel.
because you're in a browser mode, the report will display the analysis command-line for you to run manually.
3) copy the analysis command-line from the report, add "-d" to the end of it and execute it.

the "-d" will print debug messages that should indicate what went wrong during the analysis.
please share the output so that we can assist you further.
also please provide more info about the OS and Platform you're running analysis on.
 

thanks,
Magdy

Colin_Reinhardt
Beginner
167 Views

Hi, I am not able to install Firefox browser and cannot open the HTML as you suggest using either IE, Edge, or Chrome since they all block local HTML file access.

I am using Intel SDK for Applications R3 (Version=6.3.0.1904) with MS Visual Studio 2015.

On a Lenovo Thinkpad P50 (Intel Xeon CPU E3-1505M w/ HD Graphics P530) running Windows 10 64-bit

My graphics driver version is Intel 20.19.15.4483.

Is there another way to get/enter the analysis command-line from the Session info to run in with debug output from command-line?

Colin_Reinhardt
Beginner
167 Views

Hello Intel? I would like to fix this. Thank you.

Jeffrey_M_Intel1
Employee
167 Views

Here is how you can construct a command line without cut-and-paste from the browser.  To test I made a session called Colin_UW, built it, set the variables, etc.

1. Go to the session directory.  By default it is in c:/Users/{your username}/Documents/Code Builder Sessions.  Here are the contents of the directory:

$ ls
Colin_UW.cbsession  program.ir          program_Add_1D.meta  program_x64.spirv     program_x86.spir
Colin_UW.xml        program.ll          program_x64.ll       program_x64.txtspirv  program_x86.spirv
program.cl          program_Add_1D.gen  program_x64.spir     program_x86.ll        program_x86.txtspirv

2.  Find the configuration name

$ grep 'KBConfigurationNames' Colin_UW.cbsession
KBTabs\2\KBConfigurationNames=config_0

 

3. Find your kernel name:

$ grep 'kernel' program.cl
 __kernel void Add_1D(__global int* pA, __global int* pB, __global int* pC)


4.  Now create the CodeBuilder command line.  Note that '-d' is added for extra debug info.

$ CodeBuilder.exe analyze-session -s Colin_UW.cbsession -k Add_1D -c config_0 -d -f

or

$ CodeBuilder.exe analyze-kernel -s Colin_UW.cbsession -k Add_1D -c config_0 -d -f

 

5. View the reports:

$ Codebuilder --view Out/Add_1D_Out.html

 

Hope this helps.

 

Magdy_K_Intel
Employee
167 Views

Hi Colin,

Colin wrote:

Hi, I am not able to install Firefox browser and cannot open the HTML as you suggest using either IE, Edge, or Chrome since they all block local HTML file access.

in you internet explorer, press F12, go to the "Emulation" tab and set the document mode to "10" instead of "Edge", it will grant access and you'll see the command.

IE_Emulation.png
 

Reply