1//===- LinalgBase.td - Linalg dialect base support ---------*- tablegen -*-===// 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 is the definition file for base linear algebra support. 10// 11//===----------------------------------------------------------------------===// 12 13#ifndef LINALG_BASE 14#define LINALG_BASE 15 16include "mlir/IR/OpBase.td" 17 18def Linalg_Dialect : Dialect { 19 let name = "linalg"; 20 let description = [{ 21 The `linalg` dialect groups together a set of types, operations and 22 transformations that are useful to implement a structured abstraction on 23 buffers and tensors. These abstractions are useful for transformations and 24 can lower to scalar load/store and other operations or to more general 25 library calls. 26 27 Additional [Linalg Dialect 28 Documentation](https://mlir.llvm.org/docs/Dialects/Linalg) and a 29 [Rationale 30 Document](https://mlir.llvm.org/docs/Rationale/RationaleLinalgDialect) are 31 are also available and should be read first before going in the details of 32 the op semantics. 33 }]; 34 let cppNamespace = "::mlir::linalg"; 35} 36 37// Whether a type is a RangeType. 38def LinalgIsRangeTypePred : CPred<"$_self.isa<RangeType>()">; 39def Range : DialectType<Linalg_Dialect, LinalgIsRangeTypePred, "range">; 40 41#endif // LINALG_BASE 42