MLIR 23.0.0git
uArchCommon.h
Go to the documentation of this file.
1//===- uArchCommon.h --------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// \file
10// Common functionality related to uArch instances.
11//
12//
13//===----------------------------------------------------------------------===//
14#ifndef MLIR_DIALECT_XEGPU_UARCH_UARCHCOMMON_H
15#define MLIR_DIALECT_XEGPU_UARCH_UARCHCOMMON_H
16
17#include "IntelGpuXe2.h"
18#include "IntelGpuXe3.h"
19
20namespace mlir {
21namespace xegpu {
22namespace uArch {
23
24inline const uArch *getUArch(llvm::StringRef archName) {
25 if (archName.equals_insensitive("pvc"))
26 return PVCuArch::getInstance();
27 if (archName.equals_insensitive("bmg"))
28 return BMGuArch::getInstance();
29 if (archName.equals_insensitive("cri"))
30 return CRIuArch::getInstance();
31 return nullptr;
32}
33
34} // namespace uArch
35} // namespace xegpu
36} // namespace mlir
37
38#endif // MLIR_DIALECT_XEGPU_UARCH_UARCHCOMMON_H
const uArch * getUArch(llvm::StringRef archName)
Definition uArchCommon.h:24
Include the generated interface declarations.
static const uArch * getInstance()
Definition IntelGpuXe2.h:68
static const uArch * getInstance()
Definition IntelGpuXe3.h:58
static const uArch * getInstance()
Definition IntelGpuXe2.h:59