Intel® Media SDK Program Analysis
Use Intel® VTune™ Profiler to enable analysis of Intel® Media SDK tasks execution over time.
Prerequisites
:
To analyze the Intel Media SDK tasks execution, make sure to do the following:
- Windows* OS:Install the latest Intel Graphics driver from https://downloadcenter.intel.com
- Linux* OS:Install the Intel® Media SDK and check that your system is configured for GPU analysis. For remote collection, configure your target Linux system.
- If you are running the analysis on a Windows machine, register yourGPU Event Trace for Windows (ETW)so that you can see packet details of the execution of the MediaSDK program. At the command line, type:<vtune>\bin64\amplxe-gpuetwreg.exe -s
To configure the Intel Media SDK program analysis, do the following:
Configure Target
Launch the
VTune
with root privileges and configure analysis for your Intel Media SDK target.
Profiler
For the
Launch Application
mode, follow the standard
project setup and
analysis target setup process and specify your application or a script as a target.
VTune
automatically sets environment variables and, on Linux, creates an
Profiler
.mfx_trace
configuration file for Intel Media SDK program analysis.
For the
Attach To Process
and
Profile System
modes, the
.mfx_trace
is not created by the
VTune
automatically, which makes the Intel Media SDK program analysis incomplete. You need to manually enable MFX tracing as follows:
Profiler
- Configure the system to include ITT traces to the result.For Linux:export INTEL_LIBITTNOTIFY32=/opt/intel/oneapi/vtune/latest/lib32/runtime/libittnotify_collector.so export INTEL_LIBITTNOTIFY64=/opt/intel/oneapi/vtune/latest/lib64/runtime/libittnotify_collector.soFor Windows:set INTEL_LIBITTNOTIFY32=C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin32\runtime\ittnotify_collector.dll set INTEL_LIBITTNOTIFY64=C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64\runtime\ittnotify_collector.dll
- On Linux, before running the analysis, generate the.mfx_tracefile:echo "Output=0x30" > $HOME/.mfx_trace chmod +r $HOME/.mfx_trace
If, for some reason, settings in this file are different from the settings specified in the
VTune
project, the
Profiler
.mfx_trace
settings will prevail and re-write the
VTune
project settings.
Profiler
Run Analysis
- Click theConfigure Analysisbutton on theVTunetoolbar.Profiler
- In theHOWpane, select an analysis type for Intel Media SDK program profiling, for example: GPU Compute/Media Hotspots analysis, GPU Offload analysis, or a custom analysis.
- Make sure theTrace GPU Programming APIsoption is selected.
- Optionally: For custom analysis, select theGPU Utilizationoption.For the GPU Compute/Media Hotspots and GPU Offload analysis types, this option is enabled by default.
- ClickStartto launch the analysis.
When the data collection completes, the
VTune
opens the result in the default viewpoint. Start with the Profiler
Graphics
window to
analyze the CPU workload during the execution of the Intel Media SDK tasks.