This repository was archived by the owner on Mar 28, 2023. It is now read-only.
[SYCL] Split AtomicRef 64-bit tests into separate files #436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some devices do not support 64-bit atomics, in which case most AtomicRef tests would fail due to them assuming 64-bit atomics being available.
The availability of 64-bit atomics can be queried in SYCL 2020 using
aspect::atomic64
. However, the generated device code will fail to compile if there exists any kernels using 64-bit atomics, even if the test intents to skip testing said kernel.To circumvent this, all AtomicRef tests that previously mixed 64-bit atomics with smaller atomic operations are split into two test files, one with non-64-bit atomics and one with only the 64-bit atomics. The latter test is skipped if the selected device does not have
aspect::atomic64
.Likewise, the atomic memory order test is further split into tests for each of the tested atomic memory orderings. This is also to avoid invalid instructions in the generated device code on devices that do not support the corresponding atomic memory order.
Additionally, affected AtomicRef tests are now also run on accelerators.
Change summary:
aspect::atomic64
.memory_order::acq_rel
andmemory_order::seq_cst
.Note: Check for
aspect::atomic64
on devices is currently only implemented for the CUDA backend, so the 64-bit atomic tests are not run on any other backend until correct responses are implemented foraspect::atomic64
on other backends.