Profiling Accelerator Kernels
With 'N'
–tp
values and two
–ta
values, the compiler generates up to N+1 versions of the subprogram. It first generates up to N versions, for each
–tp
value, ignoring the accelerator regions, which is equivalent to using
–ta=host
. It then generates one additional version with the accelerator target.
Profiling Accelerator Kernels
This release supports the command line option:
-ta=nvidia,time
The time
suboption links in a timer library, which collects and prints out simple timing information about the accelerator regions and generated kernels.
Example 7.1. Accelerator Kernel Timing Data bb04.f90
s1
15: region entered 1 times
time(us): total=1490738
init=1489138 region=1600
kernels=155 data=1445
w/o init: total=1600 max=1600
min=1600 avg=1600
18: kernel launched 1 times
time(us): total=155 max=155 min=155 avg=155
In this example, a number of things are occurring:
• For each accelerator region, the file name
/proj/qa/tests/accel/bb04.f90
and subroutine or function name s1
is printed, with the line number of the accelerator region, which in the example is
15
.
• The library counts how many times the region is entered (
1
in the example) and the microseconds spent in the region (in this example
1490738
), which is split into initialization time (in this example
1489138
) and execution time (in this example
1600
).
• The execution time is then divided into kernel execution time and data transfer time between the host and
GPU.
• For each kernel, the line number is given, (
18
in the example), along with a count of kernel launches, and the total, maximum, minimum, and average time spent in the kernel, all of which are 155 in this example.
Related Accelerator Programming Tools
PGPROF pgcollect
The PGI profiler, PGPROF, has an
Accelerator tab
- that displays profiling information provided by the accelerator. This information is available in the file pgprof.out
and is collected by using
pgcollect
on an executable binary compiled for an accelerator target. For more information on
pgcollect
, refer to Chapter 22,
“pgcollect Reference,” of the PGI Tools Guide.
NVIDIA CUDA Profile
You can use the NVIDIA CUDA Profiler with PGI-generated code for the NVIDIA GPUs. You may download the
CUDA Profiler from the same website as the CUDA software:
100