GTPin
|
========================================================================================
========================================================================================
Binary Instrumentation Technology is widely used in the world of CPUs, in software and hardware development for dynamic performance analysis, emulation of future instructions, tracing, modeling, and more. The Binary Instrumentation technology for x86, named the Pin project, is the underlying technology for many internal and external tools. However, in the world of Graphics Processing Units (GPU), and specifically in Intel® GPU (GEN) architecture, the profiling and performance analysis capabilities are limited, or even simply absent.
The GTPin framework is a unique platform, and the only SW platform available for profiling the GEN Execution Units (EUs). GTPin provides a binary instrumentation engine for Intel GPUs EUs, along with an API for developing analysis tools, and many sample tools. GTPin allows you to capture a range of dynamic profiling data at the finest granularity of the specific GPU EU instruction. GTPin supports both compute and graphics workloads. It operates on regular, real-world GPU applications, as well as on precaptured API streams. The technology enables fast and accurate dynamic analysis of the code that is executing on the GPU EUs. GTPin opens up new opportunities to perform dynamic, low level workload and HW analysis on an Intel GPU, with greater efficiency than other current solutions. Some of the GTPin capabilities are integrated into Intel® VTune™ Profiler, Intel® Advisor and the Intel® Graphics Performance Analyzers (Intel® GPA).
GTPin is available, along with a set of analysis tools based on the GTPin framework. It also enables more advanced users to develop their own analysis tools. GTPin can analyze any GPU application. It also collects dynamic profiling data which the application executes on the GPU.
The rest of this guide describes GTPin capabilities, describes how to develop a profiling tool on top of GTPin, describes its API, and shows several examples how to use it.
Tutorial sections:
Reference sections:
========================================================================================
========================================================================================
The picture below shows a software stack schematic of an original graphics or GP-GPU application that exploits a GPU device, and how profiling flow goes. GTPin framework is located beneath the application. The original application is not aware of being instrumented, and all the process happens in a completely transparent manner. GTPin receives the original binary kernel from the driver and instruments it. All the original instructions of the kernel, their order and flow remain intact. In addition, some extra instructions are added to the kernel to perform the profiling functionality. The new binary kernel - which is the new instrumented kernel - is sent for the execution on the device. During the execution the profiling data is collected within a memory buffer. In the end of the process GTPin retrieves the gathered profiling data from the memory and passes it back to the user for further analysis.
To perform any instrumentation work GTPin must be instructed by a Profiling Tool (or Profiling Application). The latter drives the instrumentation process, decides what kind of the instrumentation to perform, what kind of profiling data to collect, and how to process the gathered data. Profiling Tool communicates with GTPin framework via the "Tool API" interface. The rest of this tutorial describes the Tool API and how to create a new Profiling Tool based on existing examples.
========================================================================================
========================================================================================
GTPin supports the following operating systems:
GTPin supports 64-bit and 32-bit applications.
GTPin supports the following graphics and GP-GPU interfaces:
GTPin supports the following HW platforms:
GTPin is unique as the only framework that allows performing binary instrumentation of the Intel GPU (GEN) kernels for profiling purposes.
GTPin provides a set of ready-to-use analysis tools, and also allows advanced users to develop their own tools. Some of the available GTPin analysis tools include:
GTPin can capture any architecturally available data at the lowest possible level: the single EU assembly instruction.
More details on the existing tools can be found in GTPin Sample Tools.
GTPin collects profiling data separately, for:
Profiling of a GPU workload can be limited to an area of interest by specifying instrumentation filters. These filters define the instrumentation and analysis scope in terms of
========================================================================================
========================================================================================
To install GTPin you must unzip the release package that is provided as a zipped archive.
When opened, the GTPin package has the following directory structure:
In addition, the package contains the GTPin license and required external licenses.
========================================================================================
========================================================================================
The following command runs application under GTPin and profiles GPU kernels with the tool toolname:
Refer to the section GTPin Configuration for the information on available GTPin arguments.
========================================================================================
========================================================================================
GTPin supports several configuration arguments. The most useful arguments are:
-t, –toolname
–profile_dir
–dump_isa
–hw_profile_scope
–thread_group_scope
–filter
-h, –help
To see all the supported arguments, run the following command:
========================================================================================
========================================================================================
The list of the ready-to-use sample tools:
Copyright (C) 2013-2023 Intel Corporation
SPDX-License-Identifier: MIT