How to use OpenCL* with Intel® VTune™ Amplifier XE 2013 on an Intel® Xeon Phi™ coprocessor


This article explains how to use  Intel® VTune™ Amplifier XE 2013 in order in collect performance data on an OpenCL* application running on an Intel® Xeon Phi™ coprocessor.


Xeon Phi coprocessor driver setup:

  1. cd /opt/intel/vtune_amplifier_xe_2013/bin64/k1om
  2. ./
  3. ./
  4. ./
    1. This step is necessary for the JIT collection on the Xeon Phi coprocessor. The previous steps enable the sampling collection driver.
  5. service mpss restart
    1. You need to restart the system for the new drivers to be loaded.

OpenCL* application

In order for your OpenCL* kernel code to run on a Xeon Phi coprocessor you need to specify the OpenCL* device as an accelerator type.

err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_ACCELERATOR, 1, &device_id, NULL)

You should then be able to compile your application. Using the Intel compiler:

icc –g –L/opt/intel/opencl/lib64 –lintelocl –lcl_logger

 Running an analysis in the VTune Amplifier XE GUI

  1. Source /opt/intel/vtune_amplifier_xe_2013/
  2. amplxe-gui &
  3. Create a project File->New->
    1. This will bring up the “Project Properties” dialog.
    2. Specify your OpenCL* binary as the application to launch,
    3. You should also specify some additional search libraries.
      1.  “Search Directories” tab
      2. Search directories for: “All"
        1. /lib/firmware/mic
        2. /opt/intel/composer_xe_2013/lib/mic
  4. Run a Lightweight-hotspots collection
    1. Click on the “New Analysis” button
      1. This will bring up the New Analysis dialog
      2. Scroll down to Knights Corner Platform -> Lightweight hotspots
      3. Click start
  5. Your application will launch and performance data will be collected on the Xeon Phi coprocessor.


Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.
Возможность комментирования русскоязычного контента была отключена. Узнать подробнее.