llvm-project/mlir/lib/Bindings/Python
Mehdi Amini f431d3878a Make Python MLIR Operation not iterable
The current behavior is conveniently allowing to iterate on the regions of an operation
implicitly by exposing an operation as Iterable. However this is also error prone and
code that may intend to iterate on the results or the operands could end up "working"
apparently instead of throwing a runtime error.
The lack of static type checking in Python contributes to the ambiguity here, it seems
safer to not do this and require and explicit qualification to iterate (`op.results`, `op.regions`, ...).

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D111697
2021-10-26 07:21:09 +00:00
..
Conversions [mlir] Remove unused namespace alias. 2021-09-30 13:50:31 +02:00
Transforms Re-engineer MLIR python build support. 2021-07-27 15:54:58 +00:00
AllPassesRegistration.cpp [mlir][python] Provide "all passes" registration module in Python 2021-05-26 15:14:57 -07:00
AsyncPasses.cpp [mlir][python] Add python support for async dialect and passes. 2021-04-28 14:52:27 +00:00
DialectLinalg.cpp [mlir][linalg] Remove the StructuredOp capture mechanism. 2021-06-28 07:57:40 +00:00
DialectSparseTensor.cpp [mlir] Apply py::module_local() to a few more classes. 2021-09-14 21:56:14 +00:00
Dialects.h [mlir][Python] Upstream the PybindAdaptors.h helpers and use it to implement sparse_tensor.encoding. 2021-05-10 17:15:43 +00:00
ExecutionEngineModule.cpp [mlir][Python] Fix lifetime of ExecutionEngine runtime functions. 2021-09-28 22:32:20 +00:00
GPUPasses.cpp [mlir][python] Add basic python support for GPU dialect and passes 2021-04-28 14:52:28 +00:00
Globals.h [mlir][Python] Return and accept OpView for all functions. 2020-11-03 22:48:34 -08:00
IRAffine.cpp Fix clang-tidy warnings in MLIR Python bindings (NFC) 2021-10-19 17:15:20 +00:00
IRAttributes.cpp [mlir][python] Temporarily disable test for converting unsupported DenseElementsAttr types to a buffer. 2021-10-07 11:50:57 -07:00
IRCore.cpp Make Python MLIR Operation not iterable 2021-10-26 07:21:09 +00:00
IRInterfaces.cpp [mlir] support interfaces in Python bindings 2021-10-25 12:50:42 +02:00
IRModule.cpp [mlir][python] Simplify python extension loading. 2021-09-03 00:43:28 +00:00
IRModule.h [mlir][python] Infer result types in generated constructors whenever possible 2021-10-25 12:50:44 +02:00
IRTypes.cpp [mlir][RFC] Refactor layout representation in MemRefType 2021-10-19 12:31:15 +03:00
LinalgPasses.cpp [mlir] Register Linalg passes in C API and Python Bindings 2021-03-27 09:57:56 +01:00
MainModule.cpp [mlir] support interfaces in Python bindings 2021-10-25 12:50:42 +02:00
Pass.cpp [mlir][python] Apply py::module_local() to all classes. 2021-08-30 22:18:43 -07:00
Pass.h Ensure newlines at the end of files (NFC) 2021-10-23 08:45:29 -07:00
PybindUtils.cpp Add initial python bindings for attributes. 2020-08-23 22:16:23 -07:00
PybindUtils.h [mlir][python] provide access to function argument/result attributes 2021-09-30 09:38:13 +02:00
SparseTensorPasses.cpp [mlir][sparse][capi][python] add sparse tensor passes 2021-05-12 16:40:50 -07:00