Skip to content

OpenCL: Set compiler flags to disable optimization and correct rounding with division and squareroot

It was observed during testing that the floating point imprecision was being generated due to compile time optimizations being enabled and the rounding flag not being set. The imprecision test was performed by running all OpenCL tests with force failure to see wrong pixels and at the time of testing no wrong pixels were being reported.

Note: -cl-fp32-correctly-rounded-divide-sqrt relies on OpenCL 1.2 or greater and hence -cl-std=CL3.0 has been included to indicate OpenCL 3.0 is required for it leading to a dependency on !183 (merged). The upgrade is being performed to OpenCL 3.0 and hence the flag is being set to CL3.0, it can be set to CL1.2 in case stability and support for older devices is preferred.

close #381 (closed) All OpenCL tests in compositions and OpenCL test folder run OK. Force failing shows some wrong answers in compositions however same error (error count) is displayed in the CPU side for the same operation as well indicating a mismatch with the reference image.

Edited by Varun Samaga B L

Merge request reports

Loading