MLIR
20.0.0git
|
Python wrapper for InferShapedTypeOpInterface. More...
Classes | |
struct | AppendResultsCallbackData |
C-style user-data structure for type appending callback. More... | |
Public Member Functions | |
std::vector< PyShapedTypeComponents > | inferReturnTypeComponents (std::optional< py::list > operandList, std::optional< PyAttribute > attributes, void *properties, std::optional< std::vector< PyRegion >> regions, DefaultingPyMlirContext context, DefaultingPyLocation location) |
Given the arguments required to build an operation, attempts to infer the shaped type components. More... | |
Public Member Functions inherited from mlir::python::PyConcreteOpInterface< PyInferShapedTypeOpInterface > | |
PyConcreteOpInterface (py::object object, DefaultingPyMlirContext context) | |
Constructs an interface instance from an object that is either an operation or a subclass of OpView. More... | |
bool | isStatic () |
Returns true if this object was constructed from a subclass of OpView rather than from an operation instance. More... | |
py::object | getOperationObject () |
Returns the operation instance from which this object was constructed. More... | |
py::object | getOpView () |
Returns the opview of the operation instance from which this object was constructed. More... | |
const std::string & | getOpName () |
Returns the canonical name of the operation this interface is constructed from. More... | |
Static Public Member Functions | |
static void | appendResultsCallback (bool hasRank, intptr_t rank, const int64_t *shape, MlirType elementType, MlirAttribute attribute, void *userData) |
Appends the shaped type components provided as unpacked shape, element type, attribute to the user-data. More... | |
static void | bindDerived (ClassTy &cls) |
Static Public Member Functions inherited from mlir::python::PyConcreteOpInterface< PyInferShapedTypeOpInterface > | |
static void | bind (py::module &m) |
Creates the Python bindings for this class in the given module. More... | |
static void | bindDerived (ClassTy &cls) |
Hook for derived classes to add class-specific bindings. More... | |
Static Public Attributes | |
constexpr static const char * | pyClassName = "InferShapedTypeOpInterface" |
constexpr static GetTypeIDFunctionTy | getInterfaceID |
Additional Inherited Members | |
Protected Types inherited from mlir::python::PyConcreteOpInterface< PyInferShapedTypeOpInterface > | |
using | ClassTy = py::class_< PyInferShapedTypeOpInterface > |
using | GetTypeIDFunctionTy = MlirTypeID(*)() |
Python wrapper for InferShapedTypeOpInterface.
This interface has only static methods.
Definition at line 403 of file IRInterfaces.cpp.
|
inlinestatic |
Appends the shaped type components provided as unpacked shape, element type, attribute to the user-data.
Definition at line 420 of file IRInterfaces.cpp.
References mlir::python::PyInferShapedTypeOpInterface::AppendResultsCallbackData::inferredShapedTypeComponents.
Referenced by inferReturnTypeComponents().
|
inlinestatic |
Definition at line 467 of file IRInterfaces.cpp.
References inferReturnTypeComponents(), and mlir::python::inferReturnTypeComponentsDoc.
|
inline |
Given the arguments required to build an operation, attempts to infer the shaped type components.
Throws value_error on failure.
Definition at line 438 of file IRInterfaces.cpp.
References appendResultsCallback(), mlir::python::PyMlirContext::get(), mlir::python::PyConcreteOpInterface< PyInferShapedTypeOpInterface >::getOpName(), mlirAttributeGetNull(), mlirInferShapedTypeOpInterfaceInferReturnTypes(), mlirLogicalResultIsFailure(), mlirStringRefCreate(), mlir::python::DefaultingPyMlirContext::resolve(), and mlir::python::DefaultingPyLocation::resolve().
Referenced by bindDerived().
|
staticconstexpr |
Definition at line 410 of file IRInterfaces.cpp.
|
staticconstexpr |
Definition at line 409 of file IRInterfaces.cpp.