We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1857f51 commit e6d7896Copy full SHA for e6d7896
ggml/src/ggml-opencl/ggml-opencl.cpp
@@ -1739,6 +1739,9 @@ static void ggml_backend_opencl_synchronize(ggml_backend_t backend) {
1739
// enqueued to it won't start until commands in the other devices have
1740
// completed.
1741
static void sync_with_other_backends(ggml_backend_opencl_context * backend_ctx) {
1742
+ if (g_ggml_backend_opencl_devices.size() < 2)
1743
+ return; // No other devices to synchronize with.
1744
+
1745
std::vector<cl_event> events;
1746
events.reserve(g_ggml_backend_opencl_devices.size());
1747
0 commit comments