User Guide

Contents

Manage Invocation Taxes

When Offload Advisor detects high call count value for a potentially profitable code region, it assumes that the kernel invocation tax is paid as many times as the kernel is launched. This results in high invocation tax and cost of offloading, which means that this code region cannot benefit from offloading. This is a
pessimistic
assumption.
However, for simple applications where there is no need to wait for a kernel instance to finish, this cost can be hidden every time except the very first one.
To reflect these two approaches, the kernel invocation tax is reported in two columns in the Offload Advisor HTML report:
  • Invocation Tax
    reports the estimated time, in seconds, spent on launching each kernel instance with no taxes hidden.
  • Configuration Tax
    reports the estimated time, in seconds, spent on launching only the first instance of a kernel with all other taxes hidden.
You can tell Offload Advisor how to handle invocation taxes for your application when modeling its performance on a target device:

Hide All Taxes

For simple applications, you are recommended to enable the
optimistic
approach for estimating invocation taxes. In this approach, Offload Advisor assumes the invocation tax is paid only for the first time the kernel executes.
To enable this approach, use the
--assume-hide-taxes
option with the
analyze.py
, for example:
advixe-python <APM>/analyze.py ./advi --assume-hide-taxes [--options]
where
<APM>
is the
Offload Advisor
environment variable that points to script directory. Replace it with
$APM
on Linux* OS or
%APM%
on Windows* OS.
With this option, the tax is reported in the
Configuration Tax
column only, and the
Invocation Tax
column reports 0.

Do Not Hide Taxes

By default, Offload Advisor estimates invocation taxes using the
pessimistic
approach and assumes the invocation tax is paid each time the kernel is launched.
You can use the
--assume-never-hide-taxes
option with the
analyze.py
to explicitly tell the Offload Advisor not to hide any invocation taxes. For example:
advixe-python <APM>/analyze.py ./advi --assume-never-hide-taxes [--options]
where
<APM>
is the
Offload Advisor
environment variable that points to script directory. Replace it with
$APM
on Linux* OS or
%APM%
on Windows* OS.
With this option, the tax is reported in the
Invocation Tax
column only, and the
Configuration Tax
column reports 0.

Fine-Tune the Number of Hidden Taxes

You can fine-tune the number of invocation taxes to hide by specifying the
Invoke_tax_ratio
parameter and a fraction of invocation taxes to hide in a TOML configuration file.
  1. Create a new TOML file, for example,
    my_config.toml
    . Copy and paste the following text there:
    [scale] # Fraction of invocation taxes to hide. # Note: The invocation tax of the first kernel instance is not scaled. # Possible values: 0.0--1.0 # Default value: 0.0 Invoke_tax_ratio = <float>
    Where
    <float>
    is a fraction of invocation taxes to hide, for example,
    Invoke_tax_ratio = 0.95
    , which means that 95% of invocation taxes will be hidden and only 5% of the taxes will be estimated.
  2. Save and close the file.
  3. Run the performance projection with the new TOML file:
    advixe-python <APM>/analyze.py ./advi --config my_config.toml [--options]
    If you use the configuration parameter to control the number of taxes to hide,
    do not
    use the
    --assume-hide-taxes
    or
    --assume-never-hide-taxes
    option. These options overwrite the value of the configuration parameter.
In the generated HTML report, the
Configuration Tax
column reports the tax paid only for the first time the kernel is executed in the specified fraction, and the
Invocation Tax
column reports the rest of the taxes assuming it is paid each time the kernel executes.
If you want to model performance for a specific accelerator using a pre-defined configuration file and apply the invocation tax configuration parameter to it, you can specify several configuration files. For example, to model performance on an integrated Intel® Processor Graphics Gen9 configuration with the custom configuration tax, use the following command:
advixe-python <APM>/analyze.py ./advi --config gen9_gt2 --config my_config.toml [--options]

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804