1//===- MLProgramAttributed.td - Attr definitions -----------*- 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#ifndef MLPROGRAM_ATTRIBUTES 10#define MLPROGRAM_ATTRIBUTES 11 12include "mlir/IR/AttrTypeBase.td" 13include "mlir/Dialect/MLProgram/IR/MLProgramBase.td" 14 15// Base class for MLProgram dialect attributes. 16class MLProgram_Attr<string name, list<Trait> traits = []> 17 : AttrDef<MLProgram_Dialect, name, traits> { 18 let mnemonic = ?; 19} 20 21//===----------------------------------------------------------------------===// 22// ExternAttr 23//===----------------------------------------------------------------------===// 24 25def MLProgram_ExternAttr : MLProgram_Attr<"Extern"> { 26 let summary = "Value used for a global signalling external resolution"; 27 let description = [{ 28 When used as the value for a GlobalOp, this indicates that the actual 29 value should be resolved externally in an implementation defined manner. 30 The `sym_name` of the global is the key for locating the value. 31 32 Examples: 33 34 ```mlir 35 extern : tensor<4xi32> 36 ``` 37 }]; 38 39 let parameters = (ins AttributeSelfTypeParameter<"">:$type); 40 let mnemonic = "extern"; 41 let assemblyFormat = ""; 42} 43 44#endif // MLPROGRAM_ATTRIBUTES 45