Profiling Tools Interfaces for GPU (PTI for GPU) is a set of Getting Started Documentation and Tools Library to start performance analysis on Intel(R) Processor Graphics easily
See the code[!WARNING] The samples and auxiliary tools (other than
tools/unitrace) are no longer under active development and will be removed soon. Candidates for removal:
chapterssamplesloaderteststools/ze_tracertools/memaccesstools/gpuinfotools/oneproftools/onetracetools/instcounttools/sysmonIdentical functionality can be found in
unitracefor most of the tools. For GTPin-related tools, one can find tools and usage samples at https://www.intel.com/content/www/us/en/developer/articles/tool/gtpin.html.
This repository describes the ways of collecting performance data for Intel(R) Processor Graphics and provides a set of samples that help to start.
Samples for Profiling Tools Interfaces for GPU (PTI for GPU) are distributed under the MIT License.
You may obtain a copy of the License at https://opensource.org/license/MIT
Some samples may have higher hardware requirements.
CMake (version 3.22 and above)
Git (version 1.8 and above)
Python (version 3.9 and above)
On Linux one has to be a part of the video (Ubuntu 18 and below) or
render (Ubuntu 19 and above) user group to do any computations on
Intel(R) Processor Graphics:
sudo usermod -a -G video <username>
# OR
sudo usermod -a -G render <username>
OpenCL(TM) ICD Loader and Headers
to use non-standard path to OpenCL ICD library one may add it into
LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-opencl>
Intel(R) Graphics Compute Runtime for oneAPI Level Zero and OpenCL(TM) Driver
Intel(R) Metrics Discovery Application Programming Interface
libdrm-dev package to build the library
from sourcesif using the i915 kernel module (e.g. PVC):
echo "0" | sudo tee /proc/sys/dev/i915/perf_stream_paranoid
if using the xe kernel module (e.g. BMG):
echo "0" | sudo tee /proc/sys/dev/xe/observation_paranoid
Metrics Library for Metrics Discovery API (Metrics Library for MD API)
on Ubuntu one may perform:
sudo apt-get install libdrm-dev
More information of what is needed for particular sample can be found on sample description page.
In general, to build samples one need to perform the following steps (specific instructions for particular sample can be found on sample description page):
cd <pti_root>/samples/<sample_root>
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
To point out to specific headers and libraries one may use
-DCMAKE_INCLUDE_PATH and -DCMAKE_LIBRARY_PATH options
correspondingly, e.g.:
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INCLUDE_PATH=/tmp/level_zero/include \
-DCMAKE_LIBRARY_PATH=/tmp/level_zero/lib \
..
Run instructions may vary from sample to sample significantly, so they are provided on particular sample description page.
There is a way to build and test all the samples in one command, e.g.:
LD_LIBRARY_PATH=/usr/local/lib python <pti_root>/tests/run.py
In case of failed tests, error output will be available in stderr.log file.
It's also possible to test an exact sample or a group of samples, e.g.:
# build and test an exact sample "cl_hot_functions"
python <pti_root>/tests/run.py -s cl_hot_functions
# build and test all L0 samples
python <pti_root>/tests/run.py -s ze
To run testing in debug mode one may use -d option, e.g.:
python <pti_root>/tests/run.py -s ze_gemm -d
The script creates build directory inside each sample folder while testing.
To remove all of these folders, use:
python <pti_root>/tests/run.py -c
The two products in active development are Unitrace and PTI SDK. A new,
top-level, CMakeLists.txt file can be used to build them together.
To build them, use CMake in the root of this repository.
source /opt/intel/oneapi/setvars.sh
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release
cmake --build build
Tested software versions one may find in SOFTWARE file.
(*) Other names and brands may be claimed as property of others.
118 followers · starred Dec 2022
145 followers · starred Aug 2024
1,330 followers · starred Sep 2025
15 followers · starred Jan 2024
Profiling Tools Interfaces for GPU (PTI for GPU) is a set of Getting Started Documentation and Tools Library to start performance analysis on Intel(R) Processor Graphics easily
See the code[!WARNING] The samples and auxiliary tools (other than
tools/unitrace) are no longer under active development and will be removed soon. Candidates for removal:
chapterssamplesloaderteststools/ze_tracertools/memaccesstools/gpuinfotools/oneproftools/onetracetools/instcounttools/sysmonIdentical functionality can be found in
unitracefor most of the tools. For GTPin-related tools, one can find tools and usage samples at https://www.intel.com/content/www/us/en/developer/articles/tool/gtpin.html.
This repository describes the ways of collecting performance data for Intel(R) Processor Graphics and provides a set of samples that help to start.
Samples for Profiling Tools Interfaces for GPU (PTI for GPU) are distributed under the MIT License.
You may obtain a copy of the License at https://opensource.org/license/MIT
Some samples may have higher hardware requirements.
CMake (version 3.22 and above)
Git (version 1.8 and above)
Python (version 3.9 and above)
On Linux one has to be a part of the video (Ubuntu 18 and below) or
render (Ubuntu 19 and above) user group to do any computations on
Intel(R) Processor Graphics:
sudo usermod -a -G video <username>
# OR
sudo usermod -a -G render <username>
OpenCL(TM) ICD Loader and Headers
to use non-standard path to OpenCL ICD library one may add it into
LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-opencl>
Intel(R) Graphics Compute Runtime for oneAPI Level Zero and OpenCL(TM) Driver
Intel(R) Metrics Discovery Application Programming Interface
libdrm-dev package to build the library
from sourcesif using the i915 kernel module (e.g. PVC):
echo "0" | sudo tee /proc/sys/dev/i915/perf_stream_paranoid
if using the xe kernel module (e.g. BMG):
echo "0" | sudo tee /proc/sys/dev/xe/observation_paranoid
Metrics Library for Metrics Discovery API (Metrics Library for MD API)
on Ubuntu one may perform:
sudo apt-get install libdrm-dev
More information of what is needed for particular sample can be found on sample description page.
In general, to build samples one need to perform the following steps (specific instructions for particular sample can be found on sample description page):
cd <pti_root>/samples/<sample_root>
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
To point out to specific headers and libraries one may use
-DCMAKE_INCLUDE_PATH and -DCMAKE_LIBRARY_PATH options
correspondingly, e.g.:
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INCLUDE_PATH=/tmp/level_zero/include \
-DCMAKE_LIBRARY_PATH=/tmp/level_zero/lib \
..
Run instructions may vary from sample to sample significantly, so they are provided on particular sample description page.
There is a way to build and test all the samples in one command, e.g.:
LD_LIBRARY_PATH=/usr/local/lib python <pti_root>/tests/run.py
In case of failed tests, error output will be available in stderr.log file.
It's also possible to test an exact sample or a group of samples, e.g.:
# build and test an exact sample "cl_hot_functions"
python <pti_root>/tests/run.py -s cl_hot_functions
# build and test all L0 samples
python <pti_root>/tests/run.py -s ze
To run testing in debug mode one may use -d option, e.g.:
python <pti_root>/tests/run.py -s ze_gemm -d
The script creates build directory inside each sample folder while testing.
To remove all of these folders, use:
python <pti_root>/tests/run.py -c
The two products in active development are Unitrace and PTI SDK. A new,
top-level, CMakeLists.txt file can be used to build them together.
To build them, use CMake in the root of this repository.
source /opt/intel/oneapi/setvars.sh
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release
cmake --build build
Tested software versions one may find in SOFTWARE file.
(*) Other names and brands may be claimed as property of others.
118 followers · starred Dec 2022
145 followers · starred Aug 2024
1,330 followers · starred Sep 2025
15 followers · starred Jan 2024