Activate GPU update support in SYCL build
[alexxy/gromacs.git] / src / gromacs / mdtypes / state_propagator_data_gpu_impl_gpu.cpp
index e6db89f1a99512b6cf0592f68d7c5f95987c4a9e..c08c8f59000e13330acb727f470b63fe6c0cd5bb 100644 (file)
@@ -171,9 +171,9 @@ void StatePropagatorDataGpu::Impl::reinit(int numAtomsLocal, int numAtomsAll)
     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_);
     }
@@ -334,7 +334,7 @@ void StatePropagatorDataGpu::Impl::copyCoordinatesToGpu(const gmx::ArrayRef<cons
     //   - 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);
     }