MLIR  16.0.0git
NVVMDialect.h
Go to the documentation of this file.
1 //===- NVVMDialect.h - MLIR NVVM IR dialect ---------------------*- 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 // This file defines the NVVM IR dialect in MLIR, containing NVVM operations and
10 // NVVM specific extensions to the LLVM type system.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_
15 #define MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_
16 
18 #include "mlir/IR/Dialect.h"
19 #include "mlir/IR/OpDefinition.h"
21 #include "llvm/IR/IntrinsicsNVPTX.h"
22 
23 #include "mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc"
24 
25 namespace mlir {
26 namespace NVVM {
27 
28 /// NVVM memory space identifiers.
30  /// Global memory space identifier.
32  /// Shared memory space identifier.
34 };
35 
36 /// Return the element type and number of elements associated with a wmma matrix
37 /// of given chracteristics. This matches the logic in IntrinsicsNVVM.td
38 /// WMMA_REGS structure.
39 std::pair<mlir::Type, unsigned> inferMMAType(mlir::NVVM::MMATypes type,
40  mlir::NVVM::MMAFrag frag,
41  mlir::MLIRContext *context);
42 } // namespace NVVM
43 } // namespace mlir
44 
45 ///// Ops /////
46 #define GET_ATTRDEF_CLASSES
47 #include "mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc"
48 
49 #define GET_OP_CLASSES
50 #include "mlir/Dialect/LLVMIR/NVVMOps.h.inc"
51 
52 #include "mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc"
53 
54 #endif /* MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_ */
MLIRContext is the top-level object for a collection of MLIR operations.
Definition: MLIRContext.h:56
std::pair< mlir::Type, unsigned > inferMMAType(mlir::NVVM::MMATypes type, mlir::NVVM::MMAFrag frag, mlir::MLIRContext *context)
Return the element type and number of elements associated with a wmma matrix of given chracteristics.
NVVMMemorySpace
NVVM memory space identifiers.
Definition: NVVMDialect.h:29
@ kGlobalMemorySpace
Global memory space identifier.
Definition: NVVMDialect.h:31
@ kSharedMemorySpace
Shared memory space identifier.
Definition: NVVMDialect.h:33
Include the generated interface declarations.