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

target-gpu

Specify a target GPU to collect data for if you have multiple GPUs connected to your system.

Syntax

--target-gpu=<string>

Arguments

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

Default

The most recent GPU device family that Intel® Advisor detects. If you have several such GPUs, the first device on a PCI bus is the default.

Actions Modified

collect=survey --profile-gpu

collect=tripcounts --profile-gpu

collect=roofline --profile-gpu

Usage

Make sure to specify the same device configuration for both Survey and Trip Counts & FLOP analyses..

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

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

  • On Windows* OS, see Task Manager.

  • On Linux* OS, run lspci -D.

IMPORTANT:

--target-gpu option accepts only decimal numbers in a GPU address, and the option help lists the available arguments in the acceptable format. If you use a different way to get the GPU adapter list, for example, the lspci -D command, and get the GPU address with numbers in a hexadecimal format, 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-device option modifies only the --collect=tripcounts action and is used to simulate memory cache of a specific GPU platform for Offload Modeling. The --target-gpu modifies the --collect=roofline, --collect=survey, and --collect=tripcounts and is used to select a target GPU to collect data and plot a GPU Roofline for if you have several GPUs.

Example

  1. Run Survey analysis for the GPU adapter 0:0:2.0.

  2. Run Trip Counts and FLOP analyses of the Characterization stage for the same device.

advisor --collect=survey --profile-gpu --target-gpu=0:0:2.0 --project-dir=./advi_results -- ./myApplication
advisor --collect=tripcounts --flop --profile-gpu --target-gpu=0:0:2.0 --project-dir=./advi_results -- ./myApplication

See Also