[llvm] [libsycl] add USM alloc/free functions (PR #184111)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 07:10:42 PDT 2026


================
@@ -0,0 +1,300 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL___IMPL_USM_FUNCTIONS_HPP
+#define _LIBSYCL___IMPL_USM_FUNCTIONS_HPP
+
+#include <sycl/__impl/context.hpp>
+#include <sycl/__impl/queue.hpp>
+#include <sycl/__impl/usm_alloc_type.hpp>
+
+#include <sycl/__impl/detail/config.hpp>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+
+// SYCL 2020 4.8.3.2. Device allocation functions.
+
+/// Allocates device USM.
+///
+/// \param numBytes  allocation size that is specified in bytes.
+/// \param syclDevice device that is used for allocation.
+/// \param syclContext context that contains syclDevice or its parent device if
----------------
KseniyaTikhomirova wrote:

https://github.com/llvm/llvm-project/pull/184111/changes/d07e37b3d1401fcc4c41dd25c359fd5521375724

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


More information about the llvm-commits mailing list