Lines Matching refs:py

15 namespace py = pybind11;
55 using ClassTy = py::class_<ConcreteIface>;
62 PyConcreteOpInterface(py::object object, DefaultingPyMlirContext context) in PyConcreteOpInterface()
65 operation = &py::cast<PyOperation &>(obj); in PyConcreteOpInterface()
66 } catch (py::cast_error &) { in PyConcreteOpInterface()
71 operation = &py::cast<PyOpView &>(obj).getOperation(); in PyConcreteOpInterface()
72 } catch (py::cast_error &) { in PyConcreteOpInterface()
80 throw py::value_error(msg + ConcreteIface::pyClassName); in PyConcreteOpInterface()
89 } catch (py::cast_error &) { in PyConcreteOpInterface()
90 throw py::type_error( in PyConcreteOpInterface()
98 throw py::value_error(msg + ConcreteIface::pyClassName); in PyConcreteOpInterface()
104 static void bind(py::module &m) { in bind()
105 py::class_<ConcreteIface> cls(m, "InferTypeOpInterface", in bind()
106 py::module_local()); in bind()
107 cls.def(py::init<py::object, DefaultingPyMlirContext>(), py::arg("object"), in bind()
108 py::arg("context") = py::none(), constructorDoc) in bind()
127 py::object getOperationObject() { in getOperationObject()
129 throw py::type_error("Cannot get an operation from a static interface"); in getOperationObject()
138 py::object getOpView() { in getOpView()
140 throw py::type_error("Cannot get an opview from a static interface"); in getOpView()
153 py::object obj;
223 throw py::value_error("Failed to infer result types"); in inferReturnTypes()
231 py::arg("operands") = py::none(), in bindDerived()
232 py::arg("attributes") = py::none(), py::arg("regions") = py::none(), in bindDerived()
233 py::arg("context") = py::none(), py::arg("loc") = py::none(), in bindDerived()
238 void populateIRInterfaces(py::module &m) { PyInferTypeOpInterface::bind(m); } in populateIRInterfaces()