[Mlir-commits] [mlir] [uArch][XeGPU] Add XeGPU uArch definition. (PR #153706)
Rolf Morel
llvmlistbot at llvm.org
Thu Sep 11 05:25:42 PDT 2025
================
@@ -0,0 +1,266 @@
+//===--- uArch.h ------------------------------------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// \file
+// Base uArch definition for different architectures.
+//
+//
+//===----------------------------------------------------------------------===//
+#ifndef MLIR_DIALECT_XEGPU_UARCH_UARCHBASE_H
+#define MLIR_DIALECT_XEGPU_UARCH_UARCHBASE_H
+
+#include <any>
+#include <functional>
+#include <iostream>
+#include <map>
+#include <mutex>
+#include <shared_mutex>
+#include <tuple>
+
+#include "mlir/IR/Types.h"
+
+namespace mlir {
+namespace xegpu {
+namespace uArch {
+// Architecture HW component hierarchy to present thread, core, socket ...
+struct uArchHierarchyComponent {
----------------
rolfmorel wrote:
Why should this be stringly typed? The number of different components / things to describe is limited, right? And at worst you have to add some when a new generation comes out.
Why not have a separate struct for each and use a std::variant / llvm::PointerUnion to combine them?
https://github.com/llvm/llvm-project/pull/153706
More information about the Mlir-commits
mailing list