Intel® Advisor Help
Intel® Advisor provides several methods to run the Offload Modeling perspective. These methods vary in simplicity and flexibility:
The Python script methods do not support MPI applications.
The script enables the advisor CLI, advisor-python command line tool, and the APM environment variable, which points to the directory with Offload Modeling scripts and simplifies their use.
This method is the most flexible and can analyze MPI applications.
You can generate command lines for your application and configuration with one of the following:
advisor-python <APM>/collect.py <project-dir> --dry-run -- <target-application>
Generate command lines from the Intel Advisor GUI.
Copy the commands to the clipboard and run them one by one from the command line. The commands generated might require you to add certain options and steps (for example, mark up) to complete the flow.
Run the perspective as follows:
advisor --collect=survey --project-dir=<project-dir> --stackwalk-mode=online --static-instruction-mix -- <target-application> [<target-options>]
where:
To profile a DPC++, C++/Fortran with OpenMP target, or OpenCL application running on a CPU, set the option to offline to analyze stacks after collection..
advisor --collect=tripcounts --project-dir=<project-dir> --flop --target-device=<target> [--enable-cache-simulation] [--stacks] [--data-transfer=<mode>] [--profile-jit] -- <target-application> [<target-options>]
where:
advisor --collect=dependencies --project-dir=<project-dir> --select markup=gpu_generic --loop-call-count-limit=16 [--select=<string>] [--filter-reductions] -- <target-application> [<target-options>]
where:
For more information about markup options, see Loop Markup to Minimize Overhead.
Information about loop-carried dependencies is important for modeling performance of scalar loops. See Check How Assumed Dependencies Affect Modeling.
advisor --collect=projection --project-dir=<project-dir> --config=<config> [--no-assume-dependencies] [--data-reuse-analysis] [--assume-hide-taxes] [--jit] [--custom-config=<path>]
where:
See advisor Command Line Interface Reference for more options.
Example
Collect performance data, check for dependencies for potentially profitable loops, model application performance and data transfers on a Intel® Iris® Xe MAX graphics (gen12_dg1 configuration):
advisor --collect=survey --project-dir=./advi --stackwalk-mode=online --static-instruction-mix -- myApplication
advisor --collect=tripcounts --project-dir=./advi --flop --enable-cache-simulation --target-device=gen12_dg1 --stacks --data-transfer=light -- myApplication
advisor --collect=dependencies --project-dir=./advi --select markup=gpu_generic --filter-reductions --loop-call-count-limit=16 -- myApplication
advisor --collect=projection --project-dir=./advi --config=gen12_dg1
collect.py automates profiling and allows you to run all analysis steps in one command, while analyze.py models performance of your application on a target device. This method is simple, moderately flexible, but it does not support MPI applications.
Run the scripts as follows:
advisor-python <APM>/collect.py <project-dir> [--collect=<collect-mode>] [--config=<config-file>] [--markup=<markup-mode>] [--jit] -- <target> [<target-options>]
where:
See Check How Dependencies Affect Modeling for details when you need to collect dependency data.
advisor-python <APM>/analyze.py <project-dir> [--config=<config-file>] [--assume-parallel] [--data-reuse-analysis] [--jit]
where:
See collect.py Script and analyze.py Script reference for a detailed option description and a full list of available options.
Example
Collect performance data and model application performance on a target GPU with the Intel® Iris® Xe MAX graphics (gen12_dg1 configuration) on Linux OS:
advisor-python $APM/collect.py ./advi --config=gen12_dg1 -- myApplication
advisor-python $APM/analyze.py ./advi --config=gen12_dg1
This method is the simplest, but less flexible, and it does not support analysis of MPI applications. You can use it to run all collection and modeling steps with one script.
Run the script as follows:
advisor-python <APM>/run_oa.py <project-dir> [--collect=<collect-mode>] [--config=<config-file>] [--markup=<markup-mode>] [--data-reuse-analysis] [--jit] -- <target> [<target-options>]
where:
See Check How Dependencies Affect Modeling for details when you need to collect dependency data.
See run_oa.py Script reference for a full list of available options.
Example
Run the full collection and modeling with the run_oa.py script with default gen11_icl configuration on Linux OS:
advisor-python $APM/run_oa.py ./advi -- myApplication
Intel Advisor provides several ways to work with the Offload Modeling results generated from the command line.
View Results in CLI
After you run Performance Modeling with advisor --collect=projection or analyze.py, the result summary is printed in a terminal or a command prompt. In this summary report, you can view:
For example:
Info: Selected accelerator to analyze: Intel Gen9 GT2 Integrated Accelerator 24EU 1150MHz. Info: Baseline Host: Intel® Core™ i7-9700K CPU @ 3.60GHz, GPU: Intel ® . Info: Binary Name: 'CFD'. Measured CPU Time: 44.858s Accelerated CPU+GPU Time: 15.425s Speedup for Accelerated Code: 3.8x Number of Offloads: 5 Fraction of Accelerated Code: 60% Top Offloaded Regions -------------------------------------------------------------------------------------------------------------------------------------------------- Location | Time on Baseline | Time on Target | Speedup | Bound by | Data Transfer -------------------------------------------------------------------------------------------------------------------------------------------------- [loop in compute_flux_ser at euler3d_cpu_ser.cpp:226] | 36.576s | 9.103s | 4.02x | L3_BW | 12.091MB [loop in time_step_ser at euler3d_cpu_ser.cpp:361] | 1.404s | 0.319s | 4.40x | L3_BW | 10.506MB [loop in compute_step_factor_ser at euler3d_cpu_ser.... | 0.844s | 0.158s | 5.35x | Compute | 4.682MB [loop in main at euler3d.cpp:848] | 1.046s | 0.906s | 1.15x | Dependency | 31.863MB [loop in Intel::OpenCL::TaskExecutor::in_order_execu... | 0.060s | 0.012s | 4.98x | Dependency | 0.303MB --------------------------------------------------------------------------------------------------------------------------------------------------
See Accelerator Metrics reference for more information about the metrics reported.
View Results in GUI
When you run Intel Advisor CLI or Python scripts, an .advixeproj project is created automatically in the directory specified with --project-dir. This project is interactive and stores all the collected results and analysis configurations. You can view it in the Intel Advisor GUI.
To open the project in GUI, you can run the following command from a command prompt:
advisor-gui <project-dir>
You first see a Summary report that includes the most important information about measured performance on a baseline device and modeled performance on a target device, including:
View an Interactive HTML Report
When you run Intel Advisor CLI or Python scripts, an additional set of CSV metric reports and an interactive HTML report is generated in the <project-dir>/e<NNN>/pp<NNN>/data.0 directory. These reports are light-weighted and can be easily shared as they do not require Intel Advisor GUI.
The HTML report is similar to the GUI project, but also reports additional metrics. The report contains a list of regions profitable for offloading and performance metrics, like offload data transfer traffic, estimated number of cycles on a target device, estimated speed-up, compute vs memory-bound characterization.
Save a Read-only Snapshot
A snapshot is a read-only copy of a project result, which you can view at any time using the Intel Advisor GUI. To save an active project result as a read-only snapshot:
advisor --snapshot --project-dir=<project-dir> [--cache-sources] [--cache-binaries] -- <snapshot-path>
where:
--cache-sources is an option to add application source code to the snapshot.
--cache-binaries is an option to add application binaries to the snapshot.
<snapshot-path is a path and a name for the snapshot. For example, if you specify /tmp/new_snapshot, a snapshot is saved in a tmp directory as new_snapshot.advixeexpz. You can skip this and save the snapshot to a current directory as snapshotXXX.advixeexpz.
To open the result snapshot in the Intel Advisor GUI, you can run the following command:
advisor-gui <snapshot-path>
You can visually compare the saved snapshot against the current active result or other snapshot results.
See Identify Code Regions to Offload to understand the results. This section is GUI-focused, but you can still use to it for interpretation.
For details about metrics reported, see Accelerator Metrics.