Visible to Intel only — GUID: GUID-BD71674A-C0CD-488A-8E4F-F526A58994CF
Visible to Intel only — GUID: GUID-BD71674A-C0CD-488A-8E4F-F526A58994CF
Loop Markup to Minimize Analysis Overhead
Issue
Running your target application with the Intel® Advisor can take substantially longer than running your target application without the Intel® Advisor. Depending on an accuracy level and analyses you choose for a perspective, different overhead is added to your application execution time. For example:
Runtime Overhead / Analysis |
Survey |
Characterization |
Dependencies |
MAP |
---|---|---|---|---|
Target application runtime with Intel® Advisor compared to runtime without Intel® Advisor |
1.1x longer |
2 - 55x longer |
5 - 100x longer |
5 - 20x longer |
Solutions
Use the following techniques to skip uninteresting loops and analyze only interesting loops.
Select Loops by ID
Goal: Minimize collection overhead.
Applicable analyses: Characterization with Trip Counts and FLOP collection enabled, Dependencies, Memory Access Patterns.
Use when...
You want to perform a deeper analysis on only a few loops.
CLI environment: You cannot identify source file/line numbers, such as when you are analyzing a target application for which you do not have access to source code.
Note: In the commands below, make sure to replace the myApplication with your application executable path and name before executing a command. If your application requires additional command line options, add them after the executable name.
Prerequisites:
Run a Survey analysis.
advisor CLI environment: Identify the loop IDs for the loops of interest.
advisor --report=survey --project-dir=./advi_results -- ./myApplication
In the report, the first column is the loop IDs.
Intel® Advisor reports tend to be very wide. Do one of the following to generate readable reports:
Set your console width appropriately to avoid line wrapping.
Pipe your report using the appropriate truncation command if you care only about the first few report columns.
After performing the prerequisites, do one of the following:
For Vectorization and CPU Roofline: Mark the loop(s) of interest by enabling the associated
checkbox on the Survey Report.
Then run a Characterization with Trip Counts and FLOP collection enabled, Dependencies, or Memory Access Patterns analysis.
For Offload Modeling: Go to Project Properties > Performance Modeling and enter the CLI action option --select[/topic/body/section/ul/li/p/codeph/xref/desc {"- topic/desc "}) Select loops (by file and line number, ID, or criteria) for deeper analysis. (desc]=<string> in the Other parameters field. For example, --select=5,10,12.
Mark the loop(s) of interest using the CLI action option --select=<string> (recommended) or --mark-up-list[/topic/body/section/ul/li/p/codeph/xref/desc {"- topic/desc "}) After running a Survey analysis and identifying loops of interest, select loops (by file and line number or ID) for deeper analysis. (desc]=<string> when running a Characterization with Trip Counts and FLOP collection enabled, Dependencies, or Memory Access Patterns analysis. For example, with the --select option:
advisor --collect=tripcounts --flop --project-dir=./advi_results --select=5,10,12 -- ./myApplication
Then run a Characterization with Trip Counts and FLOP collections enabled, Dependencies, or Memory Access Patterns analysis.
There are different ways to select loops is in the CLI environment:
The advisor CLI action options --mark-up-list[/topic/body/section/note/ul/li/p/codeph/xref/desc {"- topic/desc "}) After running a Survey analysis and identifying loops of interest, select loops (by file and line number or ID) for deeper analysis. (desc]=<string> and --select[/topic/body/section/note/ul/li/p/codeph/xref/desc {"- topic/desc "}) Select loops (by file and line number, ID, or criteria) for deeper analysis. (desc]=<string> merely simulate enabling a GUI
checkbox when used within -collect action. They are active only for the duration of the --collect command.
The same options used with advisor CLI action --mark-up-loops[/topic/body/section/note/ul/li/p/codeph/xref/desc {"- topic/desc "}) After running a Survey analysis and identifying loops of interest, select loops (by file and line number or criteria) for deeper analysis. (desc] actually enable a GUI
checkbox. They are active beyond the duration of the -mark-up-loops command and applies to all downstream analyses, such as Characterization with Trip Counts and FLOP collection enabled, Dependencies, Memory Access Patterns.
Select Loops by Source File/Line Number
Minimize collection overhead.
Applicable analyses: Characterization with Trip Counts and FLOP collection enabled, Dependencies, Memory Access Patterns.
Use when...
You want to perform a deeper analysis on only a few loops.
CLI environment: You are analyzing a target application for which you have access to source code and can identify source file/line numbers.
Note: In the commands below, make sure to replace the myApplication with your application executable path and name before executing a command. If your application requires additional command line options, add them after the executable name.
Prerequisites:
Run a Survey analysis.
advisor CLI environment: If necessary, identify the source file and line number for the loops of interest.
advisor --report=survey --project-dir=./advi_results -- ./myApplication
After performing the prerequisites, do one of the following:
For Vectorization and CPU Roofline: Mark the loop(s) of interest by enabling the associated
checkbox on the Survey report.
Then run a Characterization with Trip Counts and FLOP collection enabled, Dependencies, or Memory Access Patterns analysis.
For Offload Modeling: Go to Project Properties > Performance Modeling and enter the CLI action option --select[/topic/body/section/ul/li/p/codeph/xref/desc {"- topic/desc "}) Select loops (by file and line number, ID, or criteria) for deeper analysis. (desc]=<stri