[llvm] [SYCL] Add platform enumeration and info query using liboffload (PR #166927)

Tom Honermann via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 16 10:45:17 PST 2026


================
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include <detail/global_objects.hpp>
+#include <detail/platform_impl.hpp>
+
+#ifdef _WIN32
+#  include <windows.h>
+#endif
+
+#include <vector>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+namespace detail {
+
+std::vector<detail::OffloadTopology> &getOffloadTopologies() {
----------------
tahonermann wrote:

Right, I didn't even think about the fact that these functions are returning empty vectors.

I'm assuming that the reason that functions and static local variables are being used will become more clear once more of the shutdown code is added. I'll go ahead and resolve this comment for now.

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


More information about the llvm-commits mailing list