12 #include <pybind11/cast.h>
13 #include <pybind11/detail/common.h>
14 #include <pybind11/pybind11.h>
15 #include <pybind11/pytypes.h>
36 attributeType.def_classmethod(
38 [](py::object cls, MlirContext ctx) {
41 "Get an instance of AttributeType in given context.", py::arg(
"cls"),
42 py::arg(
"context") = py::none());
50 operationType.def_classmethod(
52 [](py::object cls, MlirContext ctx) {
55 "Get an instance of OperationType in given context.", py::arg(
"cls"),
56 py::arg(
"context") = py::none());
63 rangeType.def_classmethod(
65 [](py::object cls, MlirType elementType) {
68 "Gets an instance of RangeType in the same context as the provided "
70 py::arg(
"cls"), py::arg(
"element_type"));
71 rangeType.def_property_readonly(
74 "Get the element type.");
81 typeType.def_classmethod(
83 [](py::object cls, MlirContext ctx) {
86 "Get an instance of TypeType in given context.", py::arg(
"cls"),
87 py::arg(
"context") = py::none());
94 valueType.def_classmethod(
96 [](py::object cls, MlirContext ctx) {
99 "Get an instance of TypeType in given context.", py::arg(
"cls"),
100 py::arg(
"context") = py::none());
104 m.doc() =
"MLIR PDL dialect.";
PYBIND11_MODULE(_mlirDialectsPDL, m)
void populateDialectPDLSubmodule(const pybind11::module &m)
Creates a custom subclass of mlir.ir.Type, implementing a casting constructor and type checking metho...
MLIR_CAPI_EXPORTED MlirType mlirPDLOperationTypeGet(MlirContext ctx)
MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLRangeType(MlirType type)
MLIR_CAPI_EXPORTED MlirType mlirPDLAttributeTypeGet(MlirContext ctx)
MLIR_CAPI_EXPORTED MlirType mlirPDLValueTypeGet(MlirContext ctx)
MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLAttributeType(MlirType type)
MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLOperationType(MlirType type)
MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLType(MlirType type)
MLIR_CAPI_EXPORTED MlirType mlirPDLRangeTypeGetElementType(MlirType type)
MLIR_CAPI_EXPORTED MlirType mlirPDLTypeTypeGet(MlirContext ctx)
MLIR_CAPI_EXPORTED MlirType mlirPDLRangeTypeGet(MlirType elementType)
MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLValueType(MlirType type)
MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLTypeType(MlirType type)
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Include the generated interface declarations.