Gromacs
2024.4
|
#include <algorithm>
#include <vector>
#include "gromacs/gpu_utils/device_stream.h"
#include "gromacs/gpu_utils/gmxsycl.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
Implements a GpuEventSynchronizer class for SYCL.
This implementation relies on SYCL_INTEL_enqueue_barrier proposal, https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc
Using event-based synchronization is not recommended for SYCL. SYCL queues are out-of-order and rely on data dependencies, allowing only to wait for a specific kernel (by capturing the event
returned from queue.submit
) or for all the tasks in the queue (queue.wait
).