Intel® Advisor User Guide

ID 766448
Date 10/31/2024
Public
Document Table of Contents

target-gpu

Use this option to specify one or several GPU adapters from which to collect data for GPU Roofline. This helps you minimize data collection overhead by including exactly the adapters you need. If this option is not configured (default setting), all available GPU adapters will be analyzed.

Syntax

--target-gpu=<string>

Arguments

<string> is a bus/device/function address of a GPU adapter in the following format: <domain>:<bus>:<device-number>.<function-number> where <domain>,<bus>, <device-number>, <function-number> are decimal numbers.

For example: --target-gpu=0:77:0.0

To specify multiple adapters, use a comma-separated list, for example:--target-gpu=0:77:0.0,0:154:0.0

Default

If this option is not configured (default behavior), Intel® Advisor will collect data for all available GPU adapters.

Actions Modified

collect=survey --profile-gpu

collect=tripcounts --profile-gpu

collect=roofline --profile-gpu

Usage

This option is available for both Survey and Trip Counts collection. Make sure to specify the same device configuration for both Survey and Trip Counts & FLOP analyses.

For a list of GPUs with their bus/device/function address information:

  • On Windows* OS, see Task Manager.

  • On Linux* OS, run lspci -D.

To see the list of option arguments for your system, run advisor --help target-gpu and examine the option description.

IMPORTANT:

--target-gpu option accepts only decimal numbers in a GPU address. To list the available arguments in the acceptable format, it is recommended to use the option's help. If you use a different way to get the GPU adapter list, for example, the lspci -D command, then you get the GPU address with numbers in a hexadecimal format. In this case, you should convert it to the decimal format before passing to the --target-gpu option.

For example, if you have the address 0:4d:0.0, you should convert it to the decimal format first and pass it to the Intel Advisor as 0:77:0.0.

Do not confuse the --target-gpu option with the --target-device option:

  • The --target-gpu option is used to select target GPU adapters to collect data for; it allows you to target one or several GPUs. It modifies the --collect=roofline, --collect=survey, and --collect=tripcounts actions.
  • The --target-device option is used to simulate memory cache of a specific GPU platform for Offload Modeling. It modifies the --collect=tripcounts action only.

Example

  1. Run Survey analysis for the GPU adapters 0:0:2.0, 0:77:0.0, 0:154:0.0.

    advisor --collect=survey --profile-gpu --target-gpu=0:0:2.0,0:77:0.0,0:154:0.0 --project-dir=./advi_results -- ./myApplication
  2. Run Trip Counts and FLOP analyses of the Characterization stage for the same adapters.

advisor --collect=tripcounts --flop --profile-gpu --target-gpu=0:0:2.0,0:77:0.0,0:154:0.0 --project-dir=./advi_results -- ./myApplication

See Also