MLIR 22.0.0git
RegisterAllDialects.cpp
Go to the documentation of this file.
1//===- RegisterAllDialects.cpp - MLIR Dialects Registration -----*- 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 a helper to trigger the registration of all dialects and
10// passes to the system.
11//
12//===----------------------------------------------------------------------===//
13
15
101#include "mlir/IR/Dialect.h"
107
108/// Add all the MLIR dialects to the provided registry.
110 // clang-format off
111 registry.insert<acc::OpenACCDialect,
112 affine::AffineDialect,
113 amdgpu::AMDGPUDialect,
114 amx::AMXDialect,
115 arith::ArithDialect,
116 arm_neon::ArmNeonDialect,
117 arm_sme::ArmSMEDialect,
118 arm_sve::ArmSVEDialect,
119 async::AsyncDialect,
120 bufferization::BufferizationDialect,
121 cf::ControlFlowDialect,
122 complex::ComplexDialect,
123 DLTIDialect,
124 emitc::EmitCDialect,
125 func::FuncDialect,
126 gpu::GPUDialect,
127 index::IndexDialect,
128 irdl::IRDLDialect,
129 linalg::LinalgDialect,
130 LLVM::LLVMDialect,
131 math::MathDialect,
132 memref::MemRefDialect,
133 shard::ShardDialect,
134 ml_program::MLProgramDialect,
135 mpi::MPIDialect,
136 nvgpu::NVGPUDialect,
137 NVVM::NVVMDialect,
138 omp::OpenMPDialect,
139 pdl::PDLDialect,
140 pdl_interp::PDLInterpDialect,
141 ptr::PtrDialect,
142 quant::QuantDialect,
143 ROCDL::ROCDLDialect,
144 scf::SCFDialect,
145 shape::ShapeDialect,
146 smt::SMTDialect,
147 sparse_tensor::SparseTensorDialect,
148 spirv::SPIRVDialect,
149 tensor::TensorDialect,
150 tosa::TosaDialect,
151 transform::TransformDialect,
152 ub::UBDialect,
153 vector::VectorDialect,
154 wasmssa::WasmSSADialect,
155 x86vector::X86VectorDialect,
156 xegpu::XeGPUDialect,
157 xevm::XeVMDialect>();
158 // clang-format on
159
160 // Register all external models.
168 registry);
204}
205
206/// Append all the MLIR dialects to the registry contained in the given context.
208 DialectRegistry registry;
209 registerAllDialects(registry);
210 context.appendDialectRegistry(registry);
211}
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
void appendDialectRegistry(const DialectRegistry &registry)
Append the contents of the given dialect registry to the registry associated with this context.
void registerInlinerInterface(DialectRegistry &registry)
Register the LLVMInlinerInterface implementation of DialectInlinerInterface with the LLVM dialect.
void registerNVVMTargetInterfaceExternalModels(DialectRegistry &registry)
Registers the TargetAttrInterface for the #nvvm.target attribute in the given registry.
Definition Target.cpp:73
void registerInlinerInterface(DialectRegistry &registry)
Register the NVVMInlinerInterface implementation of DialectInlinerInterface with the NVVM dialect.
void registerROCDLTargetInterfaceExternalModels(DialectRegistry &registry)
Registers the TargetAttrInterface for the #rocdl.target attribute in the given registry.
Definition Target.cpp:69
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferViewFlowOpInterfaceExternalModels(DialectRegistry &registry)
void registerShardingInterfaceExternalModels(DialectRegistry &registry)
void registerBufferDeallocationOpInterfaceExternalModels(DialectRegistry &registry)
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerCastOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferDeallocationOpInterfaceExternalModels(DialectRegistry &registry)
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferDeallocationOpInterfaceExternalModels(DialectRegistry &registry)
void registerAllDialectInterfaceImplementations(DialectRegistry &registry)
void registerRuntimeVerifiableOpInterfaceExternalModels(DialectRegistry &registry)
void registerMemorySlotExternalModels(DialectRegistry &registry)
void registerAllocationOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferViewFlowOpInterfaceExternalModels(DialectRegistry &registry)
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerRuntimeVerifiableOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferDeallocationOpInterfaceExternalModels(DialectRegistry &registry)
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerSPIRVTargetInterfaceExternalModels(DialectRegistry &registry)
Registers the TargetAttrInterface for the #spirv.target_env attribute in the given registry.
Definition Target.cpp:44
void registerInferTypeOpInterfaceExternalModels(mlir::DialectRegistry &registry)
Registers external models for Infer Type interfaces for tensor ops.
void registerSubsetOpInterfaceExternalModels(DialectRegistry &registry)
void registerFindPayloadReplacementOpInterfaceExternalModels(DialectRegistry &registry)
void registerTilingInterfaceExternalModels(mlir::DialectRegistry &registry)
Registers external models for Tiling interface for tensor ops.
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerRuntimeVerifiableOpInterfaceExternalModels(DialectRegistry &registry)
void registerShardingInterfaceExternalModels(DialectRegistry &registry)
void registerSubsetOpInterfaceExternalModels(DialectRegistry &registry)
void registerBufferizableOpInterfaceExternalModels(DialectRegistry &registry)
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry &registry)
void registerXeVMTargetInterfaceExternalModels(mlir::DialectRegistry &registry)
Registers the TargetAttrInterface for the #xevm.target attribute in the given registry.
Definition Target.cpp:64
void registerAllDialects(DialectRegistry &registry)
Add all the MLIR dialects to the provided registry.