MLIR  20.0.0git
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
mlir::python::PyInferTypeOpInterface Class Reference

Python wrapper for InferTypeOpInterface. More...

+ Inheritance diagram for mlir::python::PyInferTypeOpInterface:

Classes

struct  AppendResultsCallbackData
 C-style user-data structure for type appending callback. More...
 

Public Member Functions

std::vector< PyTypeinferReturnTypes (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 its return types. More...
 
- Public Member Functions inherited from mlir::python::PyConcreteOpInterface< PyInferTypeOpInterface >
 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 (intptr_t nTypes, MlirType *types, void *userData)
 Appends the types provided as the two first arguments to the user-data structure (expects AppendResultsCallbackData). More...
 
static void bindDerived (ClassTy &cls)
 
- Static Public Member Functions inherited from mlir::python::PyConcreteOpInterface< PyInferTypeOpInterface >
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 = "InferTypeOpInterface"
 
constexpr static GetTypeIDFunctionTy getInterfaceID
 

Additional Inherited Members

- Protected Types inherited from mlir::python::PyConcreteOpInterface< PyInferTypeOpInterface >
using ClassTy = py::class_< PyInferTypeOpInterface >
 
using GetTypeIDFunctionTy = MlirTypeID(*)()
 

Detailed Description

Python wrapper for InferTypeOpInterface.

This interface has only static methods.

Definition at line 250 of file IRInterfaces.cpp.

Member Function Documentation

◆ appendResultsCallback()

static void mlir::python::PyInferTypeOpInterface::appendResultsCallback ( intptr_t  nTypes,
MlirType *  types,
void *  userData 
)
inlinestatic

Appends the types provided as the two first arguments to the user-data structure (expects AppendResultsCallbackData).

Definition at line 267 of file IRInterfaces.cpp.

References mlir::python::PyInferTypeOpInterface::AppendResultsCallbackData::inferredTypes.

Referenced by inferReturnTypes().

◆ bindDerived()

static void mlir::python::PyInferTypeOpInterface::bindDerived ( ClassTy cls)
inlinestatic

Definition at line 308 of file IRInterfaces.cpp.

References inferReturnTypes(), and mlir::python::inferReturnTypesDoc.

◆ inferReturnTypes()

std::vector<PyType> mlir::python::PyInferTypeOpInterface::inferReturnTypes ( std::optional< py::list >  operandList,
std::optional< PyAttribute attributes,
void *  properties,
std::optional< std::vector< PyRegion >>  regions,
DefaultingPyMlirContext  context,
DefaultingPyLocation  location 
)
inline

Member Data Documentation

◆ getInterfaceID

constexpr static GetTypeIDFunctionTy mlir::python::PyInferTypeOpInterface::getInterfaceID
staticconstexpr
Initial value:
=
MLIR_CAPI_EXPORTED MlirTypeID mlirInferTypeOpInterfaceTypeID()
Returns the interface TypeID of the InferTypeOpInterface.
Definition: Interfaces.cpp:88

Definition at line 256 of file IRInterfaces.cpp.

◆ pyClassName

constexpr static const char* mlir::python::PyInferTypeOpInterface::pyClassName = "InferTypeOpInterface"
staticconstexpr

Definition at line 255 of file IRInterfaces.cpp.


The documentation for this class was generated from the following file: