Intel® FPGA SDK for OpenCL™ Pro Edition: Programming Guide

ID 683846
Date 12/19/2022
Public
Document Table of Contents

7.20. Relaxing the Order of Floating-Point Operations (-ffp-reassociate)

Include the -ffp-reassociate option in your aoc command to direct the Intel® FPGA SDK for OpenCL™ Offline Compiler to relax the order of arithmetic floating-point operations using a balanced tree hardware implementation.

This flag turns on the same optimizations as the deprecated –fp-relaxed flag for all instructions, unless denoted otherwise by the fp reassociate pragma. For information about the fp reassociate pragma, refer to Floating Point Optimizations (fp contract and fp reassociate Pragma).

Note: Implementing a balanced tree structure leads to more efficient hardware at the expense of numerical variation in results. To implement this optimization control, your program must be able to tolerate small variations in the floating-point results.

To direct the offline compiler to execute a balanced tree hardware implementation, invoke the aoc -ffp-reassociate <your_kernel_filename>.cl command.