|
MLIR 22.0.0git
|
A PyOpView is equivalent to the C++ "Op" wrappers: these are the basis for providing more instance-specific accessors and serve as the base class for custom ODS-style operation classes. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyOpView (const nanobind::object &operationObject) | |
| PyOperation & | getOperation () override |
| Each must provide access to the raw Operation. | |
| nanobind::object | getOperationObject () |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase | |
| virtual | ~PyOperationBase ()=default |
| void | print (std::optional< int64_t > largeElementsLimit, std::optional< int64_t > largeResourceLimit, bool enableDebugInfo, bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope, bool useNameLocAsPrefix, bool assumeVerified, nanobind::object fileObject, bool binary, bool skipRegions) |
| Implements the bound 'print' method and helps with others. | |
| void | print (PyAsmState &state, nanobind::object fileObject, bool binary) |
| nanobind::object | getAsm (bool binary, std::optional< int64_t > largeElementsLimit, std::optional< int64_t > largeResourceLimit, bool enableDebugInfo, bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope, bool useNameLocAsPrefix, bool assumeVerified, bool skipRegions) |
| void | writeBytecode (const nanobind::object &fileObject, std::optional< int64_t > bytecodeVersion) |
| void | walk (std::function< PyWalkResult(MlirOperation)> callback, PyWalkOrder walkOrder) |
| void | moveAfter (PyOperationBase &other) |
| Moves the operation before or after the other operation. | |
| void | moveBefore (PyOperationBase &other) |
| bool | isBeforeInBlock (PyOperationBase &other) |
| Given an operation 'other' that is within the same parent block, return whether the current operation is before 'other' in the operation list of the parent block. | |
| bool | verify () |
| Verify the operation. | |
Static Public Member Functions | |
| static nanobind::object | buildGeneric (std::string_view name, std::tuple< int, bool > opRegionSpec, nanobind::object operandSegmentSpecObj, nanobind::object resultSegmentSpecObj, std::optional< nanobind::list > resultTypeList, nanobind::list operandList, std::optional< nanobind::dict > attributes, std::optional< std::vector< PyBlock * > > successors, std::optional< int > regions, PyLocation &location, const nanobind::object &maybeIp) |
| static nanobind::object | constructDerived (const nanobind::object &cls, const nanobind::object &operation) |
| Construct an instance of a class deriving from OpView, bypassing its __init__ method. | |
A PyOpView is equivalent to the C++ "Op" wrappers: these are the basis for providing more instance-specific accessors and serve as the base class for custom ODS-style operation classes.
Since this class is subclass on the python side, it must present an init method that operates in pure python types.
| mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpView::PyOpView | ( | const nanobind::object & | operationObject | ) |
Definition at line 1783 of file IRCore.cpp.
|
static |
Definition at line 1591 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
static |
Construct an instance of a class deriving from OpView, bypassing its __init__ method.
The derived class will typically define a constructor that provides a convenient builder, but we need to side-step this when constructing an OpView for an already-built operation.
The caller is responsible for verifying that operation is a valid operation to construct cls with.
Definition at line 1775 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inlineoverridevirtual |
Each must provide access to the raw Operation.
Implements mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOperationBase.
|
inline |