[llvm] [libsycl] USM Aligned allocation functions (PR #213468)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 06:53:08 PDT 2026
================
@@ -31,18 +32,34 @@ void *malloc_device(std::size_t numBytes, const queue &syclQueue,
syclQueue.get_context(), propList);
}
+void *aligned_alloc_device(size_t alignment, size_t numBytes,
+ const device &syclDevice, const context &syclContext,
+ const property_list &propList) {
+ return aligned_alloc(alignment, numBytes, syclDevice, syclContext,
+ usm::alloc::device, propList);
+}
+
+void *aligned_alloc_device(size_t alignment, size_t numBytes,
+ const queue &syclQueue,
+ const property_list &propList) {
+ return aligned_alloc_device(alignment, numBytes, syclQueue.get_device(),
+ syclQueue.get_context(), propList);
+}
+
// SYCL 2020 4.8.3.3. Host allocation functions.
void *malloc_host(std::size_t numBytes, const context &syclContext,
----------------
KseniyaTikhomirova wrote:
with aligned allocations ready, I would expect here just forwarding to aligned alloc function with alignment = 0
https://github.com/llvm/llvm-project/pull/213468
More information about the llvm-commits
mailing list