Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

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

Document Table of Contents

fopenmp-target-buffers, Qopenmp-target-buffers

Enables a way to overcome the problem where some OpenMP* offload SPIR-V* devices produce incorrect code when a target object is larger than 4GB. This feature is only available for ifx.

Syntax

Linux:

-fopenmp-target-buffers=keyword

macOS:

None

Windows:

/Qopenmp-target-buffers:keyword

Arguments

keyword

Possible values are:

default

Tells the compiler to use default heuristics. This may produce incorrect code on some OpenMP* offload SPIR-V* devices when a target object is larger than 4GB.

4GB

Tells the compiler to generate code to prevent the issue described by default. OpenMP* offload programs that access target objects of size larger than 4GB in target code require this option.

This setting applies to the following:

  • Target objects declared in OpenMP* target regions or inside OpenMP* declare target functions

  • Target objects that exist in the OpenMP* device data environment

  • Objects that are mapped and/or allocated by means of OpenMP* APIs (such as omp_target_alloc)

Default

default

If you do not specify this option, the compiler may produce incorrect code on some OpenMP* offload SPIR-V* devices when a target object is larger than 4GB.

Description

This option enables a way to overcome the problem where some OpenMP* offload SPIR-V* devices produce incorrect code when a target object is larger than 4GB (4294959104 bytes).

However, note that when -fopenmp-target-buffers=4GB (or /Qopenmp-target-buffers:4GB) is specified on Intel® GPUs, there may be a decrease in performance.

To use this option, you must also specify option -fopenmp-targets (Linux*) or /Qopenmp-targets (Windows*).

NOTE:

This option may have no effect for some OpenMP* offload SPIR-V* devices, and for OpenMP* offload targets different from SPIR*.

NOTE:

When OpenMP* offloading is enabled, this option only applies to device-specific compilation.

IDE Equivalent

Visual Studio: Code Generation > Specify buffer size for OpenMP offload kernel access limitations (ifx only)

Alternate Options

None

See Also