Intel® Advisor Help
You can control how to model invocation taxes for your application.
When Intel® 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. The result is 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.
In the Offload Modeling report, the kernel invocation tax is reported in the Estimated Bounded By > Kernel Launch Tax column. This metric includes time spent for kernel configuration (first launch), each kernel launch, and kernel code transfers.
You can tell Intel Advisor how to handle invocation taxes for your application when modeling its performance on a target device.
For simple applications, you are recommended to enable the optimistic approach for estimating invocation taxes. In this approach, Offload Modeling assumes the invocation tax is paid only for the first time the kernel executes.
To enable this approach:
advisor --collect=projection --assume-hide-taxes --project-dir=./advi_results
where ./advi_results is a path to your project directory. Make sure to replace it with your actual project directory where you collected results to before running the command.
Check how the Kernel Launch Tax column value changed with the option used.
By default, Offload Modeling estimates invocation taxes using the pessimistic approach and assumes the invocation tax is paid each time the kernel is launched.
advisor --collect=projection --no-assume-hide-taxes --project-dir=./advi_results
where ./advi_results is a path to your project directory. Make sure to replace it with your actual project directory where you collected results to before running the command.
Check how the Kernel Launch Tax column value changed with the option used.
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.
[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_hidden_ratio = <float>
where <float> is a fraction of invocation taxes to hide, for example, Invoke_tax_hidden_ratio = 0.95, which means that 95% of invocation taxes will be hidden and only 5% of the taxes will be estimated.
advisor --collect=projection --custom-config=my_config.toml --project-dir=./advi_results
where ./advi_results is a path to your project directory. Make sure to replace it with your actual project directory where you collected results to before running the command.
You can also use the --set-parameter="scale.Invoke_tax_hidden_ratio = <float>" for the Performance Modeling to set the number of invocation taxes to hide only for the current execution. In this case, you do not need to create a custom configuration file.
Check how the Kernel Launch Tax column value changed with the parameter modified.