Skip to content

Commit b9b2661

Browse files
silee2akroviakov
andauthored
[MLIR][Dialect] Add XeVM dialect (#144811)
XeVM is a new dialect that is designed to exposes Intel GPU hardware features in a future proof way. RFC is here: https://discourse.llvm.org/t/mlir-rfc-dialect-xevm-proposal-for-new-xevm-dialect/86955 In short, XeVM is the nvvm or rocdl for Intel GPU. The RFC includes background and challenges that XeVM is designed to solve. And also lists plan for upstreaming at the end. This PR is the first of a series and it covers dialect definition and op tests only. Co-authored-by: Artem Kroviakov <artem.kroviakov@intel.com>
1 parent 274e798 commit b9b2661

File tree

8 files changed

+1128
-3
lines changed

8 files changed

+1128
-3
lines changed

mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,13 @@ mlir_tablegen(VCIXConversions.inc -gen-llvmir-conversions)
8787
mlir_tablegen(VCIXOpsAttributes.h.inc -gen-attrdef-decls -attrdefs-dialect=vcix)
8888
mlir_tablegen(VCIXOpsAttributes.cpp.inc -gen-attrdef-defs -attrdefs-dialect=vcix)
8989
add_public_tablegen_target(MLIRVCIXConversionsIncGen)
90+
91+
add_mlir_dialect(XeVMOps xevm)
92+
add_mlir_doc(XeVMOps XeVMDialect Dialects/ -gen-dialect-doc -dialect=xevm)
93+
set(LLVM_TARGET_DEFINITIONS XeVMOps.td)
94+
mlir_tablegen(XeVMConversions.inc -gen-llvmir-conversions)
95+
mlir_tablegen(XeVMOpsEnums.h.inc -gen-enum-decls)
96+
mlir_tablegen(XeVMOpsEnums.cpp.inc -gen-enum-defs)
97+
mlir_tablegen(XeVMOpsAttributes.h.inc -gen-attrdef-decls -attrdefs-dialect=xevm)
98+
mlir_tablegen(XeVMOpsAttributes.cpp.inc -gen-attrdef-defs -attrdefs-dialect=xevm)
99+
add_public_tablegen_target(MLIRXeVMConversionsIncGen)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//===-- XeVMDialect.h - MLIR XeVM target definitions ------------*- C++ -*-===//
2+
//
3+
// This file is licensed 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+
#ifndef MLIR_DIALECT_LLVMIR_XEVMDIALECT_H_
10+
#define MLIR_DIALECT_LLVMIR_XEVMDIALECT_H_
11+
12+
#include "mlir/Bytecode/BytecodeOpInterface.h"
13+
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
14+
#include "mlir/IR/Dialect.h"
15+
#include "mlir/IR/OpDefinition.h"
16+
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
17+
18+
#include "mlir/Dialect/LLVMIR/XeVMOpsEnums.h.inc"
19+
20+
#define GET_ATTRDEF_CLASSES
21+
#include "mlir/Dialect/LLVMIR/XeVMOpsAttributes.h.inc"
22+
23+
#define GET_OP_CLASSES
24+
#include "mlir/Dialect/LLVMIR/XeVMOps.h.inc"
25+
26+
#include "mlir/Dialect/LLVMIR/XeVMOpsDialect.h.inc"
27+
28+
#endif /* MLIR_DIALECT_LLVMIR_XEVMDIALECT_H_ */

0 commit comments

Comments
 (0)