================
@@ -0,0 +1,50 @@
+//===-- IntelGPUTargetParser.h - Parser for Intel GPU targets ---*- C++ 
-*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file provides access to the Intel GPU list in IntelGPUTargetParser.def.
+// Only what is needed to name the device a driver reports is declared here; 
the
+// table itself carries more, and a consumer that needs the rest either 
declares
+// it here as well or expands the table directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TARGETPARSER_INTELGPUTARGETPARSER_H
+#define LLVM_TARGETPARSER_INTELGPUTARGETPARSER_H
+
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Compiler.h"
+#include <cstdint>
+#include <string>
+
+namespace llvm {
+namespace IntelGPU {
+
+/// Intel GPU architecture names, covering both physical devices and the
+/// compatibility names that stand for a whole product line.
+enum GPUKind : uint8_t {
+  GK_NONE = 0,
+#define INTEL_GPU(NAME, KIND, ARCHITECTURE, RELEASE, IGCA_TARGET, IGCA_SUFFIX) 
\
+  GK_##KIND,
+#define INTEL_GPU_COMPAT(NAME, KIND, IGCA_TARGET, IGCA_SUFFIX) GK_##KIND,
+#include "llvm/TargetParser/IntelGPUTargetParser.def"
+};
+
+/// Return the name of the device that \p GPUIPVersion, as reported by the
+/// driver, identifies, e.g. "xe-pvc", or "" if the table lists no such device.
+/// The revision is ignored: every stepping of a release is one device. If
+/// several rows match, the first one in IntelGPUTargetParser.def wins.
----------------
KornevNikita wrote:

[d7ae1ce](https://github.com/llvm/llvm-project/pull/222072/commits/d7ae1ceeb4eb19ec5f8ceb7e3fda61ad5e5f9a28)

https://github.com/llvm/llvm-project/pull/222072
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to