Skip to content

Commit a518e0c

Browse files
Add sync
1 parent a8a93da commit a518e0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dpnp/backend/extensions/statistics/kth_element1d.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ struct KthElementF
296296
// if (i % 5 == 0)
297297
// prev.wait();
298298
}
299+
prev.wait();
299300
prev = run_pick_pivot(exec_q, _in, _out, k, state, items_to_sort, limit,
300301
true, {prev});
301302

@@ -359,7 +360,6 @@ struct KthElementF
359360
elems_offset = k;
360361
}
361362

362-
state.cleanup(exec_queue);
363363
auto end = std::chrono::high_resolution_clock::now();
364364

365365
auto duration =
@@ -382,6 +382,7 @@ struct KthElementF
382382
std::cout << e.what() << std::endl;
383383
}
384384

385+
state.cleanup(exec_queue);
385386
return {found, buff_offset, elems_offset, num_elems, nan_count};
386387
}
387388
};

0 commit comments

Comments
 (0)