Intel® Advisor User Guide

ID 766448
Date 11/07/2023
Public

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

Document Table of Contents

analyze.py Options

This script allows you to run an analysis on profiling data and generate report results.

Usage

advisor-python <APM>/analyze.py <project-dir> [--options]

NOTE:
Replace <APM> with $APM on Linux* OS or %APM% on Windows* OS.

Options

The following table describes options that you can use with the analyze.py script.

Option

Description

<project-dir>

Required. Specify the path to the Intel® Advisor project directory.

-h

--help

Show all script options.

--version

Display Intel® Advisor version information.

-v <verbose>

--verbose <verbose>

Specify output verbosity level:

  • 1 - Show only error messages. This is the least verbose level.

  • 2 - Show warning and error messages.

  • 3 (default) - Show information, warning, and error messages.

  • 4 - Show debug, information, warning, and error messages. This is the most verbose level.

NOTE:
This option affects the console output, but does not affect logs and report results.

--assume-dependencies (default) | --no-assume-dependencies

Assume that a loop has a dependency if the loop type is not known. When disabled, assume that a loop does not have dependencies if the loop dependency type is unknown.

--assume-hide-taxes [<loop-id> | <file-name>:<line-number>]

Use an optimistic approach to estimate invocation taxes: hide all invocation taxes except the first one.

You can provide a comma-separated list of loop IDs and source locations to hide taxes for. If you do not provide a list, taxes are hidden for all loops.

--assume-never-hide-taxes (default)

Use a pessimistic approach to estimate invocation taxes: do not hide invocation taxes.

--assume-ndim-dependency (default) | --no-assume-ndim-dependency

When searching for an optimal N-dimensional offload, assume there are dependencies between inner and outer loops.

--assume-parallel | --no-assume-parallel (default)

Assume that a loop is parallel if the loop type is not known.

--assume-single-data-transfer (default) | --no-assume-single-data-transfer

Assumed data is transferred once for each offload, and all instances share the data. When disabled, assume each data object is transferred for every instance of an offload that uses it.

This method assumes no data re-use between calls to the same kernel.

IMPORTANT:
This option requires you to enable the following options during the Trip Counts collection:
  • With collect.py, use --collect basic or --collect full.
  • With advisor --collect=tripcounts, use data-transfer=<mode>.

--atomic-access-pattern <pattern>

Select an atomic access pattern. Possible options: sequential, partial_sums_16, same. By default, it is set to partial_sums_16.

--assume-atomic-optimization-ratio <ratio>

Model atomic accesses as a number of parallel sums. Specify one of the following values: 8, 16, 32, 64, 128 to model a specific number of parallel sums. Specify 0 value to search for an optimal number of parallel sums.

Default value: '16'.

--check-profitability (default) | --no-check-profitability

Check the profitability of offloading regions. Only regions that can benefit from the increased speed are added to a report.

When disabled, add all evaluated regions to a report, regardless of the profitability of offloading specific regions.

--config <config>

Specify a configuration file by absolute path or name. If you choose the latter, the model configuration directory is searched for the file first, then the current directory.

The following device configurations are available: xehpg_512xve (default), xehpg_256xve , gen11_icl, gen12_tgl, gen12_dg1, gen9_gt4, gen9_gt3, gen9_gt2.

NOTE:
You can specify several configurations by using the option more than once.

--count-logical-instructions (default) | --no-count-logical-instructions

Use the projection of x86 logical instructions to GPU logical instructions.

--count-memory-instructions (default) | --no-count-memory-instructions

Use the projection of x86 instructions with memory to GPU SEND/SENDS instructions.

--count-mov-instructions | --no-count-mov-instructions (default)

Use the projection of x86 MOV instructions to GPU MOV instructions.

--count-send-latency {all, first, off}

Select how to model SEND instruction latency.

  • all - Assume each SEND instruction has an uncovered latency. This is a default value for GPU-to-GPU modeling with --gpu, --profile-gpu, or --analyze-gpu-kernels-only.
  • first - Assume only the first SEND instruction in a thread has an uncovered latency. This is a default value for CPU-to-GPU modeling.
  • off - Do not model SEND instruction latency.

--cpu-scale-factor <integer>

Assume a host CPU that is faster than the original CPU by the specified value.

All original CPU times are divided by the scale factor.

--data-reuse-analysis | --no-data-reuse-analysis (default)

Estimate data reuse between offloaded regions. Disabling can decrease analyze overhead.

IMPORTANT:
This option requires you to enable the following options during the Trip Counts collection:
  • With collect.py, use --collect full.
  • With advisor --collect=tripcounts, use data-transfer=full.

--data-transfer-histogram (default) | --no-data-transfer-histogram

Estimate fine-grained data transfer and latencies for each object transferred and add a memory object histogram to a report.

IMPORTANT:
This option requires you to enable track-memory-objects or data-transfer=medium or higher (for advisor CLI only) during the Trip Counts collection.

--disable-fp64-math-optimization

Disable accounting for optimized traffic for transcendentals on the GPU.

--enable-batching | --disable-batching (default)

Enable job batching for top-level offloads. Emulate the execution of more than one instance simultaneously.

--enable-edram

Enable eDRAM modeling in the memory hierarchy model.

NOTE:
Make sure to use this option with both collect.py and analyze.py.

--enable-slm

Enable SLM modeling in the memory hierarchy model.

NOTE:
Make sure to use this option with both collect.py and analyze.py.

--enforce-baseline-decomposition | --no-enforce-baseline-decomposition (default)

Use the same local size and SIMD width as measured on the baseline. When disabled, search for an optimal local size and SIMD width to optimize kernel execution time.

Enable the option for the GPU-to-GPU performance modeling.

-e, --enforce-offloads | --no-enforce-offloads (default)

Skip the profitability check, disable analyzing child loops and functions, and ensure that the rows marked for offload are offloaded even if offloading child rows is more profitable.

--estimate-max-speedup (default) | --no-estimate-max-speedup

Estimate region speedup with relaxed constraints.

NOTE:
Disabling can decrease performance model overhead.

--evaluate-min-speedup

Enable offload fraction estimation that reaches minimum speedup defined in a configuration file. Disabled by default.

--exclude-from-report <items-to-exclude>

Specify items to exclude from a report. Available items: memory_objects, sources, call_graph, dependencies, strides.

By default, you can exclude the following items from the report:

  • For the CPU-to-GPU modeling:
    • memory objects
    • sources
    • call graph
    • dependencies
  • For the GPU-to-GPU modeling:
    • memory objects
    • sources

Use this option if your report is heavy weight, for example, due to containing a lot of memory objects or sources, which slows down opening in a browser.

NOTE:
This option affects only data shown in the HTML report and does not affect data collection.

--force-32bit-arithmetics

Force all arithmetic operations to be considered single-precision FPs or int32.

--force-64bit-arithmetics

Force all arithmetic operations to be considered double-precision FPs or int64.

--gpu (recommended) | --profile-gpu | --analyze-gpu-kernels-only

Model performance only for code regions running on a GPU. Use one of the three options.

IMPORTANT:
Make sure to specify this option for both collect.py and analyze.py.
NOTE:
This is a preview feature. --analyze-gpu-kernels-only is deprecated and will be removed in futire releases.

--hide-data-transfer-tax | --no-hide-data-transfer-tax (default)

Disable data transfer tax estimation.

By default, the data transfer tax estimation is enabled.

--ignore <list>

Specify a comma-separated list of runtimes or libraries to ignores time spent in regions from these runtimes and libraries when calculating per-program speedup.

NOTE:
This does not affect estimated speedup of individual offloads.

--include-to-report <items-to-include>

Specify items to include to a report. Available items: memory_objects, sources, call_graph, dependencies, strides.

By default, you can add the following items from the report:

  • For the CPU-to-GPU modeling: strides
  • For the GPU-to-GPU modeling:
    • call graph
    • dependencies
    • strides

Use this option if you want to add more data to the report or see that some data, for example, sources or memory objects, are missing from the report, though you collected this data.

NOTE:
This option affects only data shown in the HTML report and does not affect data collection.

--loop-filter-threshold <threshold>

Specify the loop filter threshold in seconds. The default is 0.02. Loop nests with total time less than the threshold are ignored.

-m <markup>

--markup <markup>

Select markup_analyze, affecting which regions to mark up for data collection and analysis.

--model-children (default) | --no-model-children

Analyze child loops of the region head to find if some of the loops provide more profitable offload.

--model-extended-math (default) | --no-model-extended-math

Model calls to math functions such as EXP, LOG, SIN, and COS as extended math instructions, if possible.

--model-system-calls (default) | --no-model-system-calls

Analyze regions with system calls inside. The actual presence of system calls inside a region may reduce model accuracy.

--mpi-rank <mpi-rank>

Model performance for the specified MPI rank if multiple ranks were analyzed.

--ndim-depth-limit <N>

When searching for an optimal N-dimensional offload, limit the maximum loop depth that can be converted to one offload. The limit must be in the range 1 <= N <= 6. The default value is 3.

--no-cachesim

Disable cache simulation during collection. The model assumes 100% hit rate for cache.

NOTE:
Usage decreases analysis overhead.

--no-stacks

Run data analysis without using callstacks data. You can use this option to avoid bad callstacks attributed data at the expense of accuracy.

--non-accel-time-breakdown

Provide a detailed breakdown of non-offloaded parts of offloaded regions.

-o <output-dir>

--out-dir <output-dir>

Specify the directory to put all generated files into. By default, results are saved in <advisor-project>/e<NNN>/pp<MMM>/data.0. If you specify an existing directory or absolute path, results are saved in specified directory. The new directory is created if it does not exist.

If you only specify the directory <name>, results are stored in <advisor-project>/e<NNN>/pp<MMM>/<name>.

NOTE:
If you use this options, you might not be able to open the analysis results in the Intel Advisor GUI.

-p <output-name-prefix>

--out-name-prefix <output-name-prefix>

Specify a string to add to the beginning output result filenames.

NOTE:
If you use this options, you might not be able to open the analysis results in the Intel Advisor GUI.

--ove