MLIR 22.0.0git
mlir::python Namespace Reference

Namespaces

namespace  adaptors
namespace  nanobind_adaptors

Classes

class  BaseContextObject
 Base class for all objects that directly or indirectly depend on an MlirContext. More...
class  CollectDiagnosticsToStringScope
 RAII scope intercepting all diagnostics into a string. More...
class  Defaulting
 CRTP template for special wrapper types that are allowed to be passed in as 'None' function arguments and can be resolved by some global mechanic if so. More...
class  DefaultingPyLocation
 Used in function arguments when None should resolve to the current context manager set instance. More...
class  DefaultingPyMlirContext
 Used in function arguments when None should resolve to the current context manager set instance. More...
struct  MLIRError
 Custom exception that allows access to error diagnostic information. More...
class  PyAffineExpr
 Wrapper around MlirAffineExpr. Affine expressions are owned by the context. More...
class  PyAffineMap
class  PyAsmState
 Wrapper around an MlirAsmState. More...
class  PyAttribute
 Wrapper around the generic MlirAttribute. More...
class  PyBlock
 Wrapper around an MlirBlock. More...
class  PyConcreteAttribute
 CRTP base classes for Python attributes that subclass Attribute and should be castable from it (i.e. More...
class  PyConcreteOpInterface
 CRTP base class for Python classes representing MLIR Op interfaces. More...
class  PyConcreteType
 CRTP base classes for Python types that subclass Type and should be castable from it (i.e. More...
class  PyDiagnostic
 Python class mirroring the C MlirDiagnostic struct. More...
class  PyDiagnosticHandler
 Represents a diagnostic handler attached to the context. More...
class  PyDialect
 User-level dialect object. More...
class  PyDialectDescriptor
 Wrapper around an MlirDialect. More...
class  PyDialectRegistry
 Wrapper around an MlirDialectRegistry. More...
class  PyDialects
 User-level object for accessing dialects with dotted syntax such as: ctx.dialect.std. More...
class  PyGlobals
 Globals that are always accessible once the extension has been initialized. More...
class  PyInferShapedTypeOpInterface
 Python wrapper for InferShapedTypeOpInterface. More...
class  PyInferTypeOpInterface
 Python wrapper for InferTypeOpInterface. More...
class  PyInsertionPoint
 An insertion point maintains a pointer to a Block and a reference operation. More...
class  PyIntegerSet
class  PyLocation
 Wrapper around an MlirLocation. More...
class  PyMlirContext
class  PyModule
class  PyNamedAttribute
 Represents a Python MlirNamedAttr, carrying an optional owned name. More...
class  PyObjectRef
 Template for a reference to a concrete type which captures a python reference to its underlying python object. More...
class  PyOperation
class  PyOperationBase
 Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulating it. More...
class  PyOpView
 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...
class  PyRegion
 Wrapper around an MlirRegion. More...
class  PyShapedTypeComponents
 Wrapper around an shaped type components. More...
class  PyStringAttribute
class  PySymbolTable
 Bindings for MLIR symbol tables. More...
class  PyThreadContextEntry
 Tracks an entry in the thread context stack. More...
class  PyThreadPool
 Wrapper around MlirLlvmThreadPool Python object owns the C++ thread pool. More...
class  PyType
 Wrapper around the generic MlirType. More...
class  PyTypeID
 A TypeID provides an efficient and unique identifier for a specific C++ type. More...
class  PyValue
 Wrapper around the generic MlirValue. More...

Typedefs

using PyMlirContextRef = PyObjectRef<PyMlirContext>
 Wrapper around MlirContext.
using PyModuleRef = PyObjectRef<PyModule>
using PyOperationRef = PyObjectRef<PyOperation>

Functions

void populateIRInterfaces (nb::module_ &m)
void populateIRAffine (nanobind::module_ &m)
void populateIRAttributes (nanobind::module_ &m)
void populateIRCore (nanobind::module_ &m)
void populateIRInterfaces (nanobind::module_ &m)
void populateIRTypes (nanobind::module_ &m)
void populatePassManagerSubmodule (nanobind::module_ &m)
void populateRewriteSubmodule (nanobind::module_ &m)

Variables

static constexpr const char * constructorDoc
static constexpr const char * operationDoc
static constexpr const char * opviewDoc
static constexpr const char * inferReturnTypesDoc
static constexpr const char * inferReturnTypeComponentsDoc

Typedef Documentation

◆ PyMlirContextRef

Wrapper around MlirContext.

Definition at line 190 of file IRModule.h.

◆ PyModuleRef

Definition at line 511 of file IRModule.h.

◆ PyOperationRef

Definition at line 604 of file IRModule.h.

Function Documentation

◆ populateIRAffine()

void mlir::python::populateIRAffine ( nanobind::module_ & m)

Referenced by NB_MODULE().

◆ populateIRAttributes()

void mlir::python::populateIRAttributes ( nanobind::module_ & m)

Referenced by NB_MODULE().

◆ populateIRCore()

void mlir::python::populateIRCore ( nanobind::module_ & m)

Referenced by NB_MODULE().

◆ populateIRInterfaces() [1/2]

void mlir::python::populateIRInterfaces ( nanobind::module_ & m)

◆ populateIRInterfaces() [2/2]

◆ populateIRTypes()

void mlir::python::populateIRTypes ( nanobind::module_ & m)

Referenced by NB_MODULE().

◆ populatePassManagerSubmodule()

void mlir::python::populatePassManagerSubmodule ( nanobind::module_ & m)

Referenced by NB_MODULE().

◆ populateRewriteSubmodule()

void mlir::python::populateRewriteSubmodule ( nanobind::module_ & m)

Referenced by NB_MODULE().

Variable Documentation

◆ constructorDoc

const char* mlir::python::constructorDoc
staticconstexpr
Initial value:
=
R"(Creates an interface from a given operation/opview object or from a
subclass of OpView. Raises ValueError if the operation does not implement the
interface.)"

Definition at line 29 of file IRInterfaces.cpp.

Referenced by mlir::python::PyConcreteOpInterface< ConcreteIface >::bind().

◆ inferReturnTypeComponentsDoc

const char* mlir::python::inferReturnTypeComponentsDoc
staticconstexpr
Initial value:
=
R"(Given the arguments required to build an operation, attempts to infer
its return shaped type components. Raises ValueError on failure.)"

Definition at line 45 of file IRInterfaces.cpp.

Referenced by mlir::python::PyInferShapedTypeOpInterface::bindDerived().

◆ inferReturnTypesDoc

const char* mlir::python::inferReturnTypesDoc
staticconstexpr
Initial value:
=
R"(Given the arguments required to build an operation, attempts to infer
its return types. Raises ValueError on failure.)"

Definition at line 41 of file IRInterfaces.cpp.

Referenced by mlir::python::PyInferTypeOpInterface::bindDerived().

◆ operationDoc

const char* mlir::python::operationDoc
staticconstexpr
Initial value:
=
R"(Returns an Operation for which the interface was constructed.)"

Definition at line 34 of file IRInterfaces.cpp.

Referenced by mlir::python::PyConcreteOpInterface< ConcreteIface >::bind().

◆ opviewDoc

const char* mlir::python::opviewDoc
staticconstexpr
Initial value:
=
R"(Returns an OpView subclass _instance_ for which the interface was
constructed)"

Definition at line 37 of file IRInterfaces.cpp.

Referenced by mlir::python::PyConcreteOpInterface< ConcreteIface >::bind().