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

ID 767253
Date 11/07/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-rdc

Determines whether the compiler generates device code in one module (normal behavior) or it generates separate device code per source.

Syntax

Linux:

-fsycl-rdc

-fno-sycl-rdc

Windows:

-fsycl-rdc

-fno-sycl-rdc

Arguments

None

Default

-fsycl-rdc

The compiler links all device code together into one module.

Description

This option determines whether the compiler generates device code in one module (normal behavior) or it generates separate device code per source.

If you specify -fno-sycl-rdc, a separate SYCL* device code module is created for each source. The compiler will not link all device code together, but instead will treat device code in each compilation unit as independent. Note that this option does not support SYCL_EXTERNAL functions; if they are specified, an error will be displayed.

Specifying -fno-sycl-rdc may improve runtime and memory usage.

CAUTION:

Option -fno-sycl-rdc can affect option -fsycl-device-code-split. If you specify both options, -fsycl-device-code-split=off is equivalent to -fsycl-device-code-split=per_source.

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

None

Alternate Options

None

See Also