Skip to content

Intel OneAPI OpenCL compiler seems to perform fused multiply-add even with fast-math switched off #131

@martinschwinzerl

Description

@martinschwinzerl

With the Intel One API (tested on the 2021.1-beta06 release), the OpenCL compiler seems to perform some unsafe optimisations even if the no-fast-math flag from the OpenCL standard is passed to the run-time compilation stage. this results in OpenCL tests failing, in particularily

tests/sixtracklib/opencl/test_track_job_cl_opencl_cxx.cpp
tests/sixtracklib/opencl/test_track_job_cl_opencl_c99.cpp

Other environments or run-time compilers tested so far seem to not show this problem.

Short-term solution: Relax the absolute difference tolerance for these tests from currently 2e-14 to 5e-11, which seems to be large enough to accomodate the resulting differences

Proposed mid-term solution:

  • Allow the configuration of the tests and the track-job compiler options on a per-platform / per-device level to adjust for such problems in the future
  • Investigate the specific root-cause for the numerical deviation, isolate the effect on the API level and research compiler flags in order to establish the expected behaviour. To this end, create API that allows the default compiler option string to be pre-configured on a per-device / per-platform level

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIopenclOpenCL 1.x related issuestestsFailing or non-conforming behaviour of tests and examples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions