Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5135 Discussions

Cannot find Dynamic code, profiling OpenCL on Xeon Phi Coprocessor

maggie_s_
Beginner
1,098 Views

I'm a novice for VTune. My goal is to get the assembly code of OpenCL. 

 I tried to follow this link: https://software.intel.com/en-us/articles/performance-tuning-of-opencl-applications-on-intel-xeon-phi-coprocessor-using-intel-vtune-amplifier-xe-2013

According to figure 3 from the link, the picture showed many Dynamic functions. But while I profiled my application (I used OpenCL Gaussian elimination and other applications from Rodinia Benchmark suit), I cannot find any dynamic code or any of my functions. 

I tried both lightweight hotspot and hotspot with Knights Corner Platform Analysis, but still met the same problem. 

I also set CL_CONFIG_USE_VTUNE=True; ENABLE_JITPROFILING=1; for the environment 

What did i miss here? OR which function I should look for ? 

OR if you have another way to get the assembly code from OpenCL, please let me know. 

 

Screenshot from 2014-05-23 18:54:20.png

 

 

0 Kudos
8 Replies
Bernard
Valued Contributor I
1,098 Views

Do you want to see assembly code in VTune or disassembling OpenCL app?

0 Kudos
maggie_s_
Beginner
1,098 Views

What I wanna do is same as compiler nvcc with keep flag to get PTX code in GPU.

I wanna see the assembly code that generated by my OpenCL program.

 

0 Kudos
TimP
Honored Contributor III
1,098 Views

https://software.intel.com/en-us/articles/resolving-symbols-for-intel-manycore-platform-system-stack-intel-mpss-in-intel-vtune

https://software.intel.com/en-us/articles/a-new-user-interface-for-vtune-amplifier-search-directories

in case you missed some of that.  No search paths, even for your own source or compiled code, are present until you designate them.  I don't know whether your OpenCL libraries may be in yet another path.

0 Kudos
Bernard
Valued Contributor I
1,098 Views

Actually I think you should see Xeon Phi assembly code in VTune.

 Btw , PTX is still not GPU machine code. SASS is the machine code of the GPU.

0 Kudos
maggie_s_
Beginner
1,098 Views

So, do you have any idea how I can get the similar code as PTX for Xeon Phi ?

 

0 Kudos
TimP
Honored Contributor III
1,098 Views

If you mean viewing asm code as executed in your application in VTune, you would set up the search paths so that you can locate the counted events in source and asm views..  You don't need to run your cases over; you simply re-resolve after setting the desired paths.

If you mean viewing generated asm code, presumably the compiler has an option to write that to a file, and you have the option of objdump for viewing the .o files.

0 Kudos
Bernard
Valued Contributor I
1,098 Views

@maggie

Are you sure that OpenCL code for Xeon Phi is compiled into some kind of pseudo-code like PTX?

 

0 Kudos
Dmitry_P_Intel1
Employee
1,098 Views

Hell Maggie,

It is recommended to use VTune Amplifier XE 2013 Update 16 and OpenCL 2013 R3 or later. In Update 16 we set all variables that are needed automatically.

You should see your OpenCL kernels under [Dynamic] model in the process mic_server.

Double clisking on the kernel raw in the grid should provide you the Assembly view for the kernel.

You can also try to set experimental variable CL_CONFIG_USE_ITT_API=TRUE for the application to launch. In this case you will see OpenCL kernel instances annotations by frames and see them on timeline and do analysis of outliers with ../frame type/.. groupings.

Thanks & Regards, Dmitry

0 Kudos
Reply