GTPin

Welcome to GTPin

========================================================================================

Introduction

========================================================================================

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 Intel® 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 includes 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™ Amplifier, Intel® Advisor and the Intel® Graphics Performance Analyzer (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:

========================================================================================

High Level Architecture

========================================================================================

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 additional, some extra instructions are added to the kernel to perform the profiling functionality. The new binary kernel - 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 to the user.

To perform an instrumentation work GTPin is 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 so called "Tool API" interface. The rest of this tutorial explains the Tool API and how to create a new Profiling Tool based on existing examples.

GTPin-software-stack.jpg



Profiling_API.jpg



========================================================================================

Capabilities

========================================================================================

Supported operating systems

GTPin supports the following operating systems:

GTPin supports 64-bit and 32-bit applications.

Supported Gfx and GP-GPU APIs

GTPin supports the following graphics and GP-GPU interfaces:

Supported GEN hardware

GTPin supports the following HW platforms:

Intel Integrated Graphics:

Intel Discrete Graphics:

Supported capabilities

What is GTPin good for?

GTPin is a unique framework, and the only framework that allows performing binary instrumentation of the Intel GPU (GEN) kernels for profiling purposes. GTPin is available along with a set of analysis tools based on the GTPin framework. GTPin also enables more advanced users to develop their own analysis tools. GTPin can analyze any GPU application. It also collects the dynamic profiling data which the application executes in the GPU. Some of the available GTPin analysis tools include:

GTPin can capture any data available at the EU scope while executing a program. It can capture such data at the lowest granularity possible: the single EU assembly instruction. You can create an unlimited variety of analysis tools using the GTPin technology.

More details on the existing tools can be found in Profiling tools examples.

Profiling data granularity

GTPin collects profiling data separately, for:

A user can limit GTPin profiling for specific kernels and shaders, and for specific Enqueue/Draw commands.

Profiling HW scope

A user can limit GTPin profiling to a specific subset of underlying hardware (Execution Units and HW threads).

========================================================================================

Installation process

========================================================================================
To install GTPin you must unzip the release package that is provided as a zipped archive.

What's included within the package

When opened, the GTPin package has the following directory structure:

Profilers
|--Bin
|--Docs
|--Examples 
|--Include
|--Lib
|--Pin
|--Scripts

In addition, the package contains the GTPin license and required external licenses.

========================================================================================

How to run GTPin

========================================================================================

In order to run GTPin, you must run the following command line:

Profilers\Bin\gtpin.exe -t toolname [gtpin arguments] \-- app.exe [application arguments]

The list of the arguments and parameters that can be provided to GTPin is listed in GTPin Parameters.

========================================================================================

GTPin Parameters

========================================================================================

GTPin supports several configuration parameters. The most useful parameters are:

In order to see all the supported parameters, you must run the following command line:

Profilers\Bin\gtpin.exe --help

========================================================================================

GTPin Sample Tools

========================================================================================
The list of the existing sample tools can be found in Existing GTPin Sample Tools


--------------------------------------------------------------------------------- Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.

Copyright © 2011-2020 Intel Corporation. All rights reserved.

* Other names and brands may be claimed as the property of others.

 All Data Structures Functions Variables