[llvm] [libsycl] Initial prefetch implementation for queue (PR #212104)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 04:09:30 PDT 2026


================
@@ -0,0 +1,56 @@
+#include <mock/helpers.hpp>
+
+#include <sycl/__impl/queue.hpp>
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace sycl;
+using namespace ::testing;
+
+TEST(Queue, TwoPrefetches) {
+  constexpr std::size_t NumBytes = 1024;
+  constexpr int NPrefetches = 2;
+
+  mock::MockWrapper Mock;
+  queue Q;
+
+  void *Ptr = reinterpret_cast<void *>(1);
+
+  bool IsCpu = Q.get_device().is_cpu();
----------------
KseniyaTikhomirova wrote:

dead code since default mock devices are GPU devices only

https://github.com/llvm/llvm-project/pull/212104


More information about the llvm-commits mailing list