User Guide

Contents

Set Up System to Analyze GPU Kernels

To analyze performance of GPU kernels in your Data Parallel C++, OpenMP* target, or OpenCL™ application with the
GPU Roofline Insights
or
GPU-to-GPU
Offload Modeling
perspective, you need to configure your system properly:
  1. Make sure you have the Intel® Metrics Discovery Application Programming Interface. The library is included with the
    Intel® Advisor
    .
  2. Install and configure a graphics processing unit (GPU) driver for your system.
  3. For Linux* OS: Set up environment variables.
For the
Offload Modeling
perspective, make sure the kernels run with the oneAPI Level Zero back end.

Install Intel® Metrics Discovery Application Programming Interface

To collect GPU hardware metrics and GPU utilization data,
Intel Advisor
uses the Intel Metric Discovery Application Programming Interface library. This library is
delivered
with the
Intel Advisor
. If you already have the library installed and you want to use your local library, make sure you have the correct version as explained below.
If you see the
Cannot Collect GPU Hardware Metrics for the Selected GPU Adapter
error message, it means the
Intel Advisor
cannot access the library. Install the library as follows.
Windows* OS
Intel Metric Discovery Application Programming Interface library is part of a GPU driver package. You should have a driver version higher than 27.20.100.8280 for your system.
If you have a lower version of the driver, you can download it from https://downloadcenter.intel.com/.
Linux* OS
Intel Metrics Discovery Application Programming Interface library is supported on Linux OS with kernel version 4.14 or higher. You should have the Intel Metric Discovery Application Programming Interface library 1.6.0 or higher to support the selection of video adapters.
If you have a lower version of the library, you can build and install it from https://github.com/intel/metrics-discovery.

Install a GPU driver

To collect GPU hardware metrics, install Intel® software packages for general purpose GPU capabilities.
On Windows OS, install a GPU driver for your system from https://downloadcenter.intel.com/.
On Linux OS, follows the instructions in the https://dgpu-docs.intel.com/installation-guides/index.html to install and configure drivers for your operating system.

Set Up Environment Variables

On
Windows OS
, run the Survey step of the perspective as an
Administrator
.
On
Linux OS
, run the Survey step of the perspective with
root
privileges.
If you
do not
have root permissions on Linux OS, enable collecting GPU hardware metrics for non-privileged users as follows:
  1. Add your username to the video group.
    1. To check if you are already in the
      video
      group, run:
      groups | grep video
    2. If you are not part of the
      video
      group, add your username to it:
      sudo usermod -a -G video <username>
    3. Type
      groups
      to verify that you successfully added your username to the video group . If video is not listed, log out and log back in.
  2. For Ubuntu* 19.10 and higher: Add your username to the
    render
    group.
    1. To check if you are already in the
      render
      group, run:
      groups | grep render
    2. If you are not part of the
      render
      group, add your username to it:
      sudo usermod -a -G render <username>
    3. Type
      groups
      to verify that you successfully added your username to the
      render
      group . If
      render
      is not listed, log out and log back in.
  3. Set the value of the
    dev.i915.perf_stream_paranoid sysctl
    option to
    0
    :
    sysctl -w dev.i915.perf_stream_paranoid=0
    This command makes a temporary change that is lost on the next reboot. To change this option permanently, run:
    echo dev.i915.perf_stream_paranoid=0 > /etc/sysctl.d/60-mdapi.conf
  4. Disable time limit in order to run OpenCL™ kernel for a longer period of time:
    sudo sh -c "echo N> /sys/module/i915/parameters/enable_hangcheck"
    This command makes a temporary change that is lost on the next reboot. To disable the time limit
    permanently
    , append
    i915.enable_hangcheck=0
    to
    GRUB_CMDLINE_LINUX_DEFAULT
    in the
    /etc/default/grub
    directory and run the following command to update the configuration:
    sudo update-grub
Next Steps

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.