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

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 07:24:07 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();
----------------
Robertkq wrote:

Ah yeah.. I will have to remove this as well! makes sense and I saw from initial testing that it was only GPU, is it planned for mocked devices to remain GPU only?

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


More information about the llvm-commits mailing list