[llvm] [libsycl] USM Aligned allocation functions (PR #213468)

Sergey Semenov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 04:04:55 PDT 2026


================
@@ -0,0 +1,183 @@
+#include <mock/helpers.hpp>
+
+#include <sycl/__impl/device.hpp>
+#include <sycl/__impl/queue.hpp>
+#include <sycl/__impl/usm_functions.hpp>
+
+#include <detail/device_impl.hpp>
+#include <detail/queue_impl.hpp>
+
+#include <cstddef>
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace sycl;
+using namespace ::testing;
+
+TEST(USMFunctions, DeviceAllocation) {
+  constexpr size_t NumBytes = 1024;
----------------
sergey-semenov wrote:

I don't think a separate unit test for numBytes values like that would make sense, the SYCL runtime has no reason to impose restrictions on that parameter. I wouldn't object to choosing different values in existing tests if there's still a concern there though.

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


More information about the llvm-commits mailing list