From db3047158498b7f01c525b66eb7ee08e7a3a751b Mon Sep 17 00:00:00 2001 From: samaid Date: Fri, 18 Nov 2022 10:14:08 -0600 Subject: [PATCH] Documented profiling section --- docs/sources/ext_links.txt | 3 + docs/sources/index.rst | 1 - docs/sources/programming_dpep.rst | 102 +++++++++++++++++++++++++++++- docs/sources/useful_links.rst | 7 +- 4 files changed, 107 insertions(+), 6 deletions(-) diff --git a/docs/sources/ext_links.txt b/docs/sources/ext_links.txt index 105a73a..ec86a87 100644 --- a/docs/sources/ext_links.txt +++ b/docs/sources/ext_links.txt @@ -14,3 +14,6 @@ .. _Data Parallel Extension for Numpy*: https://intelpython.github.io/dpnp/ .. _IEEE 754-2019 Standard for Floating-Point Arithmetic: https://standards.ieee.org/ieee/754/6210/ .. _David Goldberg, What every computer scientist should know about floating-point arithmetic: https://www.itu.dk/~sestoft/bachelor/IEEE754_article.pdf> +.. _Intel oneAPI Base Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html +.. _Intel VTune Profiler: https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html +.. _Intel Advisor: https://www.intel.com/content/www/us/en/developer/tools/oneapi/advisor.html diff --git a/docs/sources/index.rst b/docs/sources/index.rst index 6eeb380..0cca6fa 100644 --- a/docs/sources/index.rst +++ b/docs/sources/index.rst @@ -31,4 +31,3 @@ Table of Contents programming_dpep examples useful_links - diff --git a/docs/sources/programming_dpep.rst b/docs/sources/programming_dpep.rst index 8bed9d3..3d70c66 100644 --- a/docs/sources/programming_dpep.rst +++ b/docs/sources/programming_dpep.rst @@ -126,9 +126,105 @@ there are some situations when you will need to use dpctl advanced capabilities: Debugging and profiling Data Parallel Extensions for Python *********************************************************** +`Intel oneAPI Base Toolkit`_ provides two tools to assist programmers to analyze performance issues in programs +that use **Data Parallel Extensions for Python**. They are `Intel VTune Profiler`_ and +`Intel Advisor`_. + +Intel VTune Profiler examines various performance aspects of a program like, the most time-consuming parts, +efficiency of offloaded code, impact of memory sub-systems, etc. + +Intel Advisor provides insights on the performance of offloaded code relative to the peak performance and +memory bandwidth. + +Next, we will detail the steps involved in using Intel VTune Profiler and Intel Advisor with +heterogenous programs that use **Data Parallel Extensions for Python**. + +Profiling with Intel VTune Profiler +----------------------------------- + +.. |copy| unicode:: U+000A9 + +.. |trade| unicode:: U+2122 + +Intel |copy| VTune |trade| Profiler provides two mechanisms, called *GPU offload* and *GPU hotspots*, to profile heterogeneous programs +targeted to GPUs. + +The *GPU offload* analysis profiles the entire application (both GPU and host code) and helps to identify +if the application is CPU or GPU bound. It provides information on the proportion of the execution time spent +in GPU execution. It also provides information about various hotspots in the program. The key goal of the *GPU offload* +analysis is to identify the parts of the program that can benefit from offloading to GPUs. + +The *GPU hotspots* analysis focuses on providing insights into the performance of GPU-offloaded code. +It provides insights about the parallelism in the GPU kernel, the efficiency of the kernel, SIMD utilization +and memory latency. It also provides performance data regarding synchronization operations like GPU barriers and +atomic operations. + +The following instructions are used execute the two Intel VTune Profiler analyses on programs written +using **Data Parallel Extensions for Python**. + +.. code-block:: console + :caption: **GPU Offload** + + > vtune -collect gpu-offload -r -- python