Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
martinschwinzerl opened this issue Jun 30, 2020 · 0 comments
Labels
API opencl OpenCL 1.x related issues tests Failing or non-conforming behaviour of tests and examples

Comments

@martinschwinzerl
Copy link
Contributor

martinschwinzerl commented Jun 30, 2020

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
@martinschwinzerl martinschwinzerl added opencl OpenCL 1.x related issues tests Failing or non-conforming behaviour of tests and examples API labels Jun 30, 2020
martinschwinzerl added a commit to martinschwinzerl/sixtracklib that referenced this issue Jun 30, 2020
…the tracking results to the CPU

Note: this is in relation to the issue SixTrack#131 and should only be applied tempoarily - finding the correct
platform specific compiler flags to pass onto the run-time compiler for the affected intel platform should
be done ASAP to not loose the predicibility of this test

(There was a similar situation with some NVIDIA cards in an earlier release that was addressed similarily,
please raise any objections to this approach in the comments to issue SixTrack#131)
martinschwinzerl added a commit to martinschwinzerl/sixtracklib that referenced this issue Jun 30, 2020
…ack comparisons

NOTE: please cf. issue SixTrack#131 for reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API opencl OpenCL 1.x related issues tests Failing or non-conforming behaviour of tests and examples
Projects
None yet
Development

No branches or pull requests

1 participant