[clang] [llvm] [TargetParser] Add a list of Intel GPUs, and use it in offload-arch (PR #222072)
Nikita Kornev via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 10:53:46 PDT 2026
================
@@ -0,0 +1,76 @@
+//===-- IntelGPUTargetParserTest.cpp - Intel GPU Target Parser Test -------===//
+//
+// 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 "llvm/TargetParser/IntelGPUTargetParser.h"
+#include "gtest/gtest.h"
+
+using namespace llvm;
+
+namespace {
+
+// Build a GPU IP version the way the Level Zero driver reports it.
+constexpr uint32_t gpuIPVersion(uint32_t Architecture, uint32_t Release,
+ uint32_t Revision) {
+ return (Architecture << 22) | (Release << 14) | Revision;
----------------
KornevNikita wrote:
added in 67fe13c
https://github.com/llvm/llvm-project/pull/222072
More information about the llvm-commits
mailing list