Issue |
150009
|
Summary |
[mlir][python] Op properties are broken for python
|
Labels |
mlir
|
Assignees |
|
Reporter |
fabianmcg
|
Op properties when used with python are broken in multiple ways:
1. They cannot be set when constructing an op from python, they result in dead args. For example, take `FatRawBufferCastOp`, it has `boundsCheck` and `resetOffset` as props, and the resulting python class init is:
```
def __init__(self, source, boundsCheck, resetOffset, *, validBytes=None, cacheSwizzleStride=None, loc=None, ip=None):
operands = []
results = []
attributes = {}
regions = None
operands.append(source)
operands.append(validBytes)
operands.append(cacheSwizzleStride)
_ods_context = _ods_get_default_loc_context(loc)
_ods_successors = None
super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)
```
2. Properties cannot be set from python (unless they are also an inherent attr).
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs