Intel® oneAPI DPC++/C++ Compiler

Developer Guide and Reference

ID 767253
Date 6/30/2025
Public
Document Table of Contents

foffload-fp32-prec-sqrt

Tells the compiler to enforce correct rounding. SYCL* and other offloading languages do not follow precision IEEE 754 requirements for various applications (example: PyTorch*).

Syntax

Linux:

-foffload-fp32-prec-sqrt

-fno-offload-fp32-prec-sqrt

Windows:

-foffload-fp32-prec-sqrt

-fno-offload-fp32-prec-sqrt

Arguments

None

Default

foffload-fp32-prec-sqrt

Enforces correct rounding.

Description

Enables the use of a correctly rounded sycl::sqrt function as defined by IEEE 754. Without this flag, the default precision requirement for sycl::sqrt is 3 units-in-the-last-place (ULP).

If you specify -fno-offload-fp32-prec-sqrt the result is not required to be correctly rounded.

IDE Equivalent

None

Alternate Options

None

Example

The following shows an example of using this option on Linux:

icpx -fsycl -foffload-fp32-prec-sqrt test.cpp