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

ID 767253
Date 3/31/2023
Public

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

Document Table of Contents

fsycl-force-target

Forces the compiler to use the specified target triple device when extracting device code from any given objects on the command line.

Syntax

Linux:

-fsycl-force-target=triple

Windows:

-fsycl-force-target=triple

Arguments

triple

Is a target triple device name. It tells the compiler which target should be unbundled or extracted from fat objects or archives that have already been generated.

The following triplets are supported:

spir64

Tells the compiler that the target is a SPIR64-based device.

spir64_x86_64

Tells the compiler that the target is Intel® CPU.

spir64_fpga

Tells the compiler that the target is Intel® FPGA.

spir64_gen

Tells the compiler that the target is Intel® Processor Graphics.

Default

OFF

If this option is not specified, the compiler will unbundle or extract based on the setting of option -fsycl-targets.

Description

This option forces the compiler to use the specified target triple device when extracting device code from any given objects on the command line.

You can have both spir64 and spir64_gen in your objects. When -fsycl-force-target is specified, the compiler will use the target specified in that option. It will not use the value specified in -fsycl-targets, even if it exists.

NOTE:

When using this option, you must also specify option -fsycl.

For information about available SYCL drivers, refer to Invoke the Compiler.

NOTE:

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

IDE Equivalent

Visual Studio: C/C++ > General > Force SYCL offloading bundling target

DPC++ > General > Force SYCL offloading bundling target

Eclipse: Intel(R) C++ Compiler > General > DPC++ > Force SYCL offloading bundling target

Intel(R) oneAPI DPC++ Compiler > General > DPC++ > Force SYCL offloading bundling target

Alternate Options

None

Example

The following command-line sequence demonstrates a way to use this option:

icx -fsycl -fsycl-targets=spir64_gen -fsycl-force-target=spir64 

In this case spir64 objects/archives will be extracted but spir64_gen targets will still compile.

See Also