Intel® Advisor User Guide

ID 766448
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Enforce Offloading for Specific Loops

Model performance on a target device for specific loops only even if they are not profitable.

If you want to check offload profitability only for specific loops or if your loop of interest is reported as not recommended for offloading to an accelerator, you can model performance only for these loops and ignore all other loops.

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.

To do this:

  1. Collect baseline performance data. For example, run the Survey and Characterization analyses:
    advisor --collect=survey --static-instruction-mix --project-dir=./advi_results -- ./myApplication
    advisor --collect=tripcounts --flop --stacks --enable-cache-simulation --target-device=xehpg_512xve --project-dir=./advi_results -- ./myApplication
  2. Rerun performance modeling for selected loops/functions only. For example:
    advisor --collect=projection --select=foo.cpp:34,bar.cpp:192 --enforce-offload --project-dir=./advi_results

    where:

    • --select lists loops/functions to analyze by file and line number, loop/function ID, or criteria.
    • --enforce-offloadsmodels performance for all selected loops/functions even if offloading their child loops/functions is more profitable.

View the Offload Modeling results in the Intel® Advisor GUI or view an HTML report. The results will show performance estimated for the selected loops/functions only.

Related information
Offload Modeling Command Line Reference This reference section describes the command line options available for each of the Python* scripts that you can use to run the Offload Modeling perspective.