diff --git a/ggml/src/ggml-sycl/ggml-sycl.cpp b/ggml/src/ggml-sycl/ggml-sycl.cpp index 12dd5dd2e6287..4464369a8608d 100644 --- a/ggml/src/ggml-sycl/ggml-sycl.cpp +++ b/ggml/src/ggml-sycl/ggml-sycl.cpp @@ -1774,6 +1774,9 @@ static void argsort_f32_i32_sycl(const float *x, int *dst, const int ncols, } else { GGML_ABORT("fatal error"); } + + // Ensure all kernels finish execution before proceeding further + stream->wait(); } static void argmax_f32_i32_sycl(const float *x, int *dst, const int ncols,