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

ID 767253
Date 7/13/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-optimize-non-user-code

Tells the compiler to optimize SYCL framework utility functions and to leave the kernel code unoptimized for further debugging.

Syntax

Linux:

-fsycl-optimize-non-user-code

Windows:

-fsycl-optimize-non-user-code

Arguments

None

Default

OFF

SYCL framework functions and methods are not optimized.

Description

This option tells the compiler to optimize SYCL framework utility functions and to leave the kernel code unoptimized for further debugging.

To use this option, you must also specify option -O0 (Linux) or /Od (Windows). Do not specify any other optimization setting or you will get a compilation error.

NOTE:

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

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

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.

IDE Equivalent

None

Alternate Options

None

Examples

The following command produces successful compilation:

icpx -fsycl -O0 -fsycl-optimize-non-user-code ./code.cpp

The following command produces a compilation error because only -O0 or /Od can be specified:

icpx -fsycl -O2 -fsycl-optimize-non-user-code ./code.cpp

The following command produces a compilation error because -O0 or /Od must be specified:

icpx -fsycl -fsycl-optimize-non-user-code ./code.cpp