Hi, I build a simple dialect from toy language. With follow .td code
include "mlir/IR/OpBase.td"
include "mlir/IR/FunctionInterfaces.td"
include "mlir/IR/SymbolInterfaces.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
def Toy_Dialect : Dialect {
let name = "toy";
let summary = "The Toy Dialect.";
let description = [{
The `toy` dialect is for testing and demonstrating.
}];
let cppNamespace = "::buddy::toy";
}
class Toy_Op<string mnemonic, list<Trait> traits = []> :
Op<Toy_Dialect, mnemonic, traits>;
def ConstantOp : Toy_Op<"constant", [NoSideEffect]> {
let summary = "constant";
let description = [{
Constant operation turns a literal into an SSA value. The data is attached
to the operation as an attribute. For example:
```mlir
%0 = toy.constant dense<[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]>
: tensor<2x3xf64>
```
}];
let arguments = (ins F64ElementsAttr:$value);
let results = (outs F64Tensor);
let hasCustomAssemblyFormat = 1;
let builders = [
// Build a constant with a given constant tensor value.
OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
OpBuilder<(ins "double":$value)>
];
let hasVerifier = 1;
}
WIth error
ToyOps.h.inc:87:86: error: ‘DenseElementsAttr’ has not been declared
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, DenseElementsAttr value);
how to debug?