[llvm] [SYCL] Add sycl::device initial implementation (PR #176972)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 20 09:22:02 PST 2026


================
@@ -0,0 +1,80 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains the declaration of SYCL 2020 device info types.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL___IMPL_INFO_DEVICE_HPP
+#define _LIBSYCL___IMPL_INFO_DEVICE_HPP
+
+#include <sycl/__impl/aspect.hpp>
+#include <sycl/__impl/detail/config.hpp>
+#include <sycl/__impl/info/desc_base.hpp>
+#include <sycl/__impl/info/device_type.hpp>
+
+#include <cstdint>
+#include <string>
+#include <vector>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+
+class device;
+class platform;
+
+namespace detail {
+template <typename T>
+using is_device_info_desc_t = typename is_info_desc<T, device>::return_type;
+} // namespace detail
+
+// SYCL 2020 A.3. Device information descriptors.
+namespace info {
+
+enum class partition_property : std::uint32_t {
----------------
KseniyaTikhomirova wrote:

Comparing to intel/llvm I changed the type of partition enums from intptr to uint.
It was aligned with openCL type:
typedef intptr_t cl_device_partition_property;

but I doubt we should keep it the same way.

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


More information about the llvm-commits mailing list