Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/mlir-tblgen/op-python-bindings.td
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
// CHECK: class DefaultValuedAttrsOp(_ods_ir.OpView): | // CHECK: class DefaultValuedAttrsOp(_ods_ir.OpView): | ||||
// CHECK-LABEL: OPERATION_NAME = "test.default_valued_attrs" | // CHECK-LABEL: OPERATION_NAME = "test.default_valued_attrs" | ||||
def DefaultValuedAttrsOp : TestOp<"default_valued_attrs"> { | def DefaultValuedAttrsOp : TestOp<"default_valued_attrs"> { | ||||
// CHECK: def __init__(self, *, arr=None, unsupported=None, loc=None, ip=None): | // CHECK: def __init__(self, *, arr=None, unsupported=None, loc=None, ip=None): | ||||
// CHECK: operands = [] | // CHECK: operands = [] | ||||
// CHECK: results = [] | // CHECK: results = [] | ||||
// CHECK: attributes = {} | // CHECK: attributes = {} | ||||
// CHECK: regions = None | // CHECK: regions = None | ||||
// CHECK: attributes["arr"] = arr if arr is not None else _ods_ir.ArrayAttr.get([]) | // CHECK: if arr is not None: attributes["arr"] = arr | ||||
// CHECK: unsupported is not None, "attribute unsupported must be specified" | // CHECK: if unsupported is not None: attributes["unsupported"] = unsupported | ||||
// CHECK: _ods_successors = None | // CHECK: _ods_successors = None | ||||
// CHECK: super().__init__(self.build_generic( | // CHECK: super().__init__(self.build_generic( | ||||
// CHECK: attributes=attributes, results=results, operands=operands, | // CHECK: attributes=attributes, results=results, operands=operands, | ||||
// CHECK: successors=_ods_successors, regions=regions, loc=loc, ip=ip)) | // CHECK: successors=_ods_successors, regions=regions, loc=loc, ip=ip)) | ||||
let arguments = (ins DefaultValuedAttr<I64ArrayAttr, "{}">:$arr, | let arguments = (ins DefaultValuedAttr<I64ArrayAttr, "{}">:$arr, | ||||
DefaultValuedAttr<I64ArrayAttr, "dummy_func()">:$unsupported); | DefaultValuedAttr<I64ArrayAttr, "dummy_func()">:$unsupported); | ||||
let results = (outs); | let results = (outs); | ||||
▲ Show 20 Lines • Show All 367 Lines • Show Last 20 Lines |