Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/22/2024
Public
Document Table of Contents

Hardware Profile-Guided Optimization dialog box

This topic has information on the following dialog boxes:

  • Hardware Profile-Guided Optimization (HWPGO) dialog box
  • Application Invocations dialog box
  • Edit Command dialog box
  • Command dialog box

Hardware Profile-Guided Optimization dialog box

To access the Hardware Profile-Guided Optimization dialog box, choose Tools > Intel Compiler > Hardware Profile-Guided Optimization.

Use the Hardware Profile-Guided Optimization dialog box to set the options for HWPGO.

Phase 1 - Generate Application: This phase compiles the project with option /fprofile-sample-generate to enable the compiler and linker to generate information and adjust optimization for HWPGO. The command line compiler option you can choose appears in Compiler Options, and can be one of these values:

  • /fprofile-sample-generate
  • /fprofile-sample-generate=keep-all-opt
  • /fprofile-sample-generate=med-fidelity
  • /fprofile-sample-generate=max-fidelity

NOTE:
The default compiler option /fprofile-sample-generate does not impact any optimization for HWPGO. It is equivalent to /fprofile-sample-generate=keep-all-opt.

Refer to fprofile-sample-generate for the details of this compiler option.

Phase 2 - Hardware Profiling: This phase runs applications in the Applications Invocations dialog box to create a Performance Monitoring Unit (PMU)-based profile and several LLVM profile data files. The PMU-based profile is created with the SEP tool provided by the Intel® VTune™ Profiler. The LLVM profile data files are created by the llvm-profgen tool.

The profile types you can choose appear in Profile types. Refer to Hardware Profile-Guided Optimization for more information. The types are:

  • Execution Frequency: Enable execution frequency feedback for HWPGO.
  • Execution Frequency and Branch Mispredict: Enable execution frequency and branch mispredict feedback for HWPGO.

Click Applications Invocations to add a new application or edit an existing application in the list.

Phase 3 - Optimize with Profile Data: This phase performs HWPGO.

Deselect the checkbox to skip this phase.

Profile Directory: The directory that contains the profile. Click Edit to edit the profile directory or the Browse button to browse for the profile directory.

Show this dialog next time: Deselect this checkbox to run HWPGO without displaying this dialog box. HWPGO will use the previously saved settings.

Save Settings: Click to save your settings.

Run: Click to start the HWPGO.

Cancel: Click to close this dialog box without starting the HWPGO.

Application Invocations dialog box

To access the Application Invocations dialog box, click Application Invocations... in the Hardware Profile-Guided Optimization dialog box. Use the Hardware Profile-Guided Optimization dialog box to configure your application options and add additional invocations.

The list of applications comes from the debug settings of the Startup Project.

Merge Environment: Select this checkbox to merge the application environment with the environment defined by the operating system.

To add, edit, or remove an application, click one of the buttons.

Add: Click to add a new application in the Add Command dialog box.

Duplicate: Click after selecting an application to copy its settings to use a different setting.

Edit: Click after selecting an application to change its settings in the Edit Command dialog box.

Delete: Click to remove the selected application from the list.

OK: Click to save the settings and close this dialog box.

Cancel: Click to discard the settings and close this dialog box.

Add Command dialog box

To access the Add Command dialog box, click Add in the Application Invocations dialog box. Use the Add Command dialog box to add a new application in the Application Invocations dialog box.

Command: Add a new or edit an existing application. Click Edit to open the Command dialog box with a list of macros. Click Browse to navigate to another directory that contains the application.

Command Arguments: Enter the arguments required by the application.

Post Commands: Add new or edit existing llvm-profgen commands that run after Command. Click Add to append a new llvm-profgen command to the list. Click Duplicate after selecting an existing one to copy its settings for further modification. Click Delete to remove the selected one.

Working Directory: Enter a new or edit the working directory for the application. Click Edit to open the Working Directory dialog box with a list of macros. Click Browse to navigate to the working directory of the application.

Environment: Enter the environment variable required by this application.

Merge Environment: Select this checkbox to merge the application environment with the environment defined by the operating system.

Load from Debugging Settings: Click to load the debug settings for this application.

OK: Click to save the settings and close this dialog box.

Cancel: Click to discard the settings and close this dialog box.

NOTE:
The Edit Command and Add Command dialog boxes are similar. To use the Edit Command dialog box, substitute Edit for Add in the selections above.

Command dialog box

To access the Command dialog box, click Edit in the Edit Command dialog box or Add in the Add Command dialog box. Use the Command dialog box to specify or change the macro used in the application to run as part of the HWPGO.

Select a macro from the list and then click one of these buttons:

Macro: Click to show or close the list of available macros.

Insert: Click to use the selected macro.

OK: Click to save the settings and close this dialog box.

Cancel: Click to discard the settings and close this dialog box.