#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/mtop_util.h"
-static constexpr bool sc_haveGpuConstraintSupport = GMX_GPU_CUDA;
+static constexpr bool sc_haveGpuConstraintSupport = GMX_GPU_CUDA || GMX_GPU_SYCL;
namespace gmx
{
{
DevelopmentFeatureFlags devFlags;
- devFlags.enableGpuBufferOps =
- GMX_GPU_CUDA && useGpuForNonbonded && (getenv("GMX_USE_GPU_BUFFER_OPS") != nullptr);
+ devFlags.enableGpuBufferOps = (GMX_GPU_CUDA || GMX_GPU_SYCL) && useGpuForNonbonded
+ && (getenv("GMX_USE_GPU_BUFFER_OPS") != nullptr);
devFlags.enableGpuHaloExchange = GMX_MPI && GMX_GPU_CUDA && getenv("GMX_GPU_DD_COMMS") != nullptr;
devFlags.forceGpuUpdateDefault = (getenv("GMX_FORCE_UPDATE_DEFAULT_GPU") != nullptr) || GMX_FAHCORE;
devFlags.enableGpuPmePPComm = GMX_MPI && GMX_GPU_CUDA && getenv("GMX_GPU_PME_PP_COMMS") != nullptr;
reallocateDeviceBuffer(&d_f_, numAtomsAll_, &d_fSize_, &d_fCapacity_, deviceContext_);
// Clearing of the forces can be done in local stream since the nonlocal stream cannot reach
- // the force accumulation stage before syncing with the local stream. Only done in CUDA,
- // since the force buffer ops are not implemented in OpenCL.
- if (GMX_GPU_CUDA && d_fCapacity_ != d_fOldCapacity)
+ // the force accumulation stage before syncing with the local stream. Only done in CUDA and
+ // SYCL, since the force buffer ops are not implemented in OpenCL.
+ if ((GMX_GPU_CUDA || GMX_GPU_SYCL) && d_fCapacity_ != d_fOldCapacity)
{
clearDeviceBufferAsync(&d_f_, 0, d_fCapacity_, *localStream_);
}
// - it's not needed, copy is done in the same stream as the only consumer task (PME)
// - we don't consume the events in OpenCL which is not allowed by GpuEventSynchronizer (would leak memory).
// TODO: remove this by adding an event-mark free flavor of this function
- if (GMX_GPU_CUDA)
+ if (GMX_GPU_CUDA || GMX_GPU_SYCL)
{
xReadyOnDevice_[atomLocality].markEvent(*deviceStream);
}
{
errorMessage += "Compatible GPUs must have been found.\n";
}
- if (!GMX_GPU_CUDA)
+ if (!(GMX_GPU_CUDA || GMX_GPU_SYCL))
{
- errorMessage += "Only a CUDA build is supported.\n";
+ errorMessage += "Only CUDA and SYCL builds are supported.\n";
}
if (inputrec.eI != IntegrationAlgorithm::MD)
{