User and Reference Guide for the Intel® C++ Compiler 14.0
This topic only applies to IA-32 architecture targeting Intel® Graphics Technology. Intel® Graphics Technology is a preview feature.
In many models of Intel processors that include Intel® Graphics Technology, you can offload a reasonable amount of parallelizable work. When compiling for IA-32 architecture, the Intel® C++ Compiler facilitates offloading existing scalar or parallel C/C++ code written for the CPU to the Processor Graphics. In many cases, you can enable this offloading by adding a minimal amount of code.
The compiler generates sections of code to run natively on the CPU, that is, the host, and to offload to the Processor Graphics, that is, the target. The offload runtime refers to the runtime libraries used to organize offload operations to the target.
The compiler and the offload runtime enable the following:
the offload process and data exchange between the host and the target
dynamic detection of target availability, and back-up execution on the host if the target is not available
Additionally, the compiler and the offload runtime facilitate the following:
debugging, on the host, of the heterogeneous source code, which is intended to be offloaded
separating a task between the host and the target
migrating the same source code for efficient execution on Intel processors or coprocessors based on the Intel® Many Integrated Core Architecture.
The compiler provides the following language extensions to facilitate programming for Intel® Graphics Technology:
|
Name |
Description |
|---|---|
|
offload pragma offload_attribute pragma parallel_loop pragma |
Pragmas to control the data transfer between the CPU and the coprocessor. |
|
__GFX__ macro __INTEL_OFFLOAD macro |
Predefined macros you can use when programming for Intel® Graphics Technology. |
|
target attribute |
An attribute to place variables and functions on the target. |
The compiler provides the following compiler options and environment variables that you can use when building a binary for Intel® Graphics Technology:
|
Compiler Option |
Description |
|---|---|
|
The negative form of Qoffload |
Ignores language constructs for offloading. |
|
Qoffload-attribute-target |
Flags every global routine and global data object in the source file with the offload attribute target(gfx). |
|
Qoffload-option |
Specifies options to be used for the specified target and tool. |
The following environment variables are only a few of the available environment variables for Intel® Graphics Technology:
|
Environment Variable |
Description |
|---|---|
|
GFX_CPU_BACKUP |
Controls whether heterogeneous code is executed on the host when the target is not available. |
|
GFX_MAX_THREAD_COUNT |
Controls the maximum number of target threads to parallelize loop nests. |
|
GFX_OFFLOAD_TIMEOUT |
Controls execution time of offload tasks. |
|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 |