Intel® VTune™ Amplifier
You can use the amplxe-cl command tool to profile applications that do computations on an Intel® HD Graphics device.
Analyzing GPU activity helps you identify whether:
your workload is CPU- or GPU-bound.
Intel integrated graphics are used at their full potential and the headroom for improvement, if any.
VTune Amplifier proposes the following workflow for GPU analysis:
To perform CPU/GPU Concurrency analysis from command line, use the collect action and specify the cpugpu-concurrency predefined analysis type:
amplxe-cl -collect cpugpu-concurrency -app-working-dir <dir> -- <target_app> [target_app_options]
where:
dir is the directory where the application runs
target_app is the application or process (for Android*) to run
target_app_options are application arguments
To perform GPU analysis from command line, use the collect action and configure the level of GPU analysis with the knob option:
amplxe-cl -collect <analysis_type> -knob <knob_name>=<knob_value> -app-working-dir <dir> -- <target_app> [target_app_options]
where:
analysis_type is the specified type of analysis
knob_name is a name of the configuration option
knob_value is a string value for this configuration option
dir is the directory where the application runs
target_app is the application or process (for Android) to run
target_app_options are application arguments
For remote Linux and Android systems, make sure to use the --target-system option to specify your target platform. For example, to collect GPU usage when running com.example.android.basicglsurfaceview package, enter:
amplxe-cl -collect hotspots -knob enable-gpu-usage=true --target-system=android -- com.example.android.basicglsurfaceview
|
Use This Knob |
To Do This |
|---|---|
|
enable-gpu-usage=true | false |
Analyze frame rate and usage of Processor Graphics engines. |
|
gpu-counters-mode=none |overview | global-local-accesses | compute-extended |
Analyze performance data from Processor Graphics based on the predefined groups of GPU hardware metrics.
This option is available only for supported platforms with the Intel® graphics driver installed. |
|
gpu-sampling-interval=<value in us> |
Set the interval between GPU samples between 10 and 1000 microseconds. Default is 1000us. An interval of less than 100us is not recommended. |
|
enable-gpu-runtimes=true | false |
Capture the execution time of OpenCL™ kernels and Intel® Media SDK programs on a GPU, identify performance-critical GPU computing tasks, and analyze the performance per GPU hardware metrics. NoteOpenCL kernels analysis is currently supported for Windows and Linux target systems with Intel HD graphics. Intel Media SDK program analysis is supported for Linux targets only and should be started with root privileges. |
Examples:
Start amplxe-cl as root and launch a Basic Hotspots analysis for an Intel Media SDK application:
$ amplxe-cl --collect hotspots --knob enable-gpu-usage=true --knob enable-gpu-runtimes=true -r <result_dir> -- <application>
Perform a Basic Hotspots analysis, enabling the enable-gpu-usage knob to analyze GPU usage of a processor graphics engine, using the Overview gpu-counters-mode counter set, which is available only on a supported platform with an Intel® graphics driver installed. Enable tracing of OpenCL kernels execution with the enable-gpu-runtimes option.
For example, to collect GPU usage as well as GPU hardware metrics and trace OpenCL kernels on the BitonicSort application (-g is the option of the application), enter:
$ amplxe-cl -collect hotspots -knob gpu-counters-mode=overview -knob enable-gpu-usage=true -knob enable-gpu-runtimes=true -- BitonicSort -g
The summary information sent to stdout includes basic details on both the CPU and GPU.
Collection and Platform Info ------------------------------------------------------------------------ Parameter r010hs ------------------------ ---------------------------------------------- Application Command Line BitonicSort "-g" Operating System Ubuntu 11.04 Computer Name <…> Result Size 1367805 CPU --- Parameter r010hs ----------------- ----------------------------------------------------- Name 3rd generation Intel® Core™ Processor family Frequency 3500000000 Logical CPU Count 8 GPU --- Parameter r010hs ----------------------------- ----------------------------------------- Name Intel® HD Graphics 4000 Vendor Intel Corporation Driver <…> Stepping 9 EU Count 16 Max EU Thread Count 8 Max Core Frequency 1150000000 Graphics Performance Analysis enabled GPU OpenCL Info --------------- Parameter r010hs ------------------- ------------- Version OpenCL C 1.2 Max Compute Units 16 Max Work Group Size 512 Local Memory 65536 Summary ------- Elapsed Time: 1.792 CPU Time: 2.282
When your analysis is completed, open the collected result in the VTune Amplifier GUI:
Examples:
View the collected data per OpenCL kernels submitted and executed on Intel Processor Graphics using the gpu-computing-tasks report type:
$ amplxe-cl -R gpu-computing-tasks -r r010hs
Filter or group the collected data by OpenCL kernel instances:
$ amplxe-cl -R gpu-computing-tasks -r r010hs -group-by computing-instance