@@ -513,7 +513,7 @@ class PyOperationIterator {
513
513
514
514
PyOperationIterator &dunderIter () { return *this ; }
515
515
516
- nb::typed<nb:: object, PyOpView> dunderNext () {
516
+ nb::object dunderNext () {
517
517
parentOperation->checkValid ();
518
518
if (mlirOperationIsNull (next)) {
519
519
throw nb::stop_iteration ();
@@ -562,7 +562,7 @@ class PyOperationList {
562
562
return count;
563
563
}
564
564
565
- nb::typed<nb:: object, PyOpView> dunderGetItem (intptr_t index) {
565
+ nb::object dunderGetItem (intptr_t index) {
566
566
parentOperation->checkValid ();
567
567
if (index < 0 ) {
568
568
index += dunderLen ();
@@ -1534,7 +1534,7 @@ nb::object PyOperation::create(std::string_view name,
1534
1534
return created.getObject ();
1535
1535
}
1536
1536
1537
- nb::typed<nb:: object, PyOpView> PyOperation::clone (const nb::object &maybeIp) {
1537
+ nb::object PyOperation::clone (const nb::object &maybeIp) {
1538
1538
MlirOperation clonedOperation = mlirOperationClone (operation);
1539
1539
PyOperationRef cloned =
1540
1540
PyOperation::createDetached (getContext (), clonedOperation);
@@ -1543,7 +1543,7 @@ nb::typed<nb::object, PyOpView> PyOperation::clone(const nb::object &maybeIp) {
1543
1543
return cloned->createOpView ();
1544
1544
}
1545
1545
1546
- nb::typed<nb:: object, PyOpView> PyOperation::createOpView () {
1546
+ nb::object PyOperation::createOpView () {
1547
1547
checkValid ();
1548
1548
MlirIdentifier ident = mlirOperationGetName (get ());
1549
1549
MlirStringRef identStr = mlirIdentifierStr (ident);
@@ -1638,9 +1638,9 @@ class PyOpResult : public PyConcreteValue<PyOpResult> {
1638
1638
1639
1639
// / Returns the list of types of the values held by container.
1640
1640
template <typename Container>
1641
- static std::vector<nb::typed<nb:: object, PyType>>
1642
- getValueTypes (Container &container, PyMlirContextRef &context) {
1643
- std::vector<nb::typed<nb:: object, PyType> > result;
1641
+ static std::vector<nb::object> getValueTypes (Container &container,
1642
+ PyMlirContextRef &context) {
1643
+ std::vector<nb::object> result;
1644
1644
result.reserve (container.size ());
1645
1645
for (int i = 0 , e = container.size (); i < e; ++i) {
1646
1646
result.push_back (PyType (context->getRef (),
@@ -2133,7 +2133,7 @@ PyAttribute PyAttribute::createFromCapsule(nb::object capsule) {
2133
2133
PyMlirContext::forContext (mlirAttributeGetContext (rawAttr)), rawAttr);
2134
2134
}
2135
2135
2136
- nb::typed<nb:: object, PyAttribute> PyAttribute::maybeDownCast () {
2136
+ nb::object PyAttribute::maybeDownCast () {
2137
2137
MlirTypeID mlirTypeID = mlirAttributeGetTypeID (this ->get ());
2138
2138
assert (!mlirTypeIDIsNull (mlirTypeID) &&
2139
2139
" mlirTypeID was expected to be non-null." );
@@ -2179,7 +2179,7 @@ PyType PyType::createFromCapsule(nb::object capsule) {
2179
2179
rawType);
2180
2180
}
2181
2181
2182
- nb::typed<nb:: object, PyType> PyType::maybeDownCast () {
2182
+ nb::object PyType::maybeDownCast () {
2183
2183
MlirTypeID mlirTypeID = mlirTypeGetTypeID (this ->get ());
2184
2184
assert (!mlirTypeIDIsNull (mlirTypeID) &&
2185
2185
" mlirTypeID was expected to be non-null." );
@@ -2219,7 +2219,7 @@ nb::object PyValue::getCapsule() {
2219
2219
return nb::steal<nb::object>(mlirPythonValueToCapsule (get ()));
2220
2220
}
2221
2221
2222
- nanobind::typed<nanobind:: object, PyValue> PyValue::maybeDownCast () {
2222
+ nb:: object PyValue::maybeDownCast () {
2223
2223
MlirType type = mlirValueGetType (get ());
2224
2224
MlirTypeID mlirTypeID = mlirTypeGetTypeID (type);
2225
2225
assert (!mlirTypeIDIsNull (mlirTypeID) &&
@@ -2263,8 +2263,7 @@ PySymbolTable::PySymbolTable(PyOperationBase &operation)
2263
2263
}
2264
2264
}
2265
2265
2266
- nb::typed<nb::object, PyOpView>
2267
- PySymbolTable::dunderGetItem (const std::string &name) {
2266
+ nb::object PySymbolTable::dunderGetItem (const std::string &name) {
2268
2267
operation->checkValid ();
2269
2268
MlirOperation symbol = mlirSymbolTableLookup (
2270
2269
symbolTable, mlirStringRefCreate (name.data (), name.length ()));
@@ -2678,8 +2677,7 @@ class PyOpAttributeMap {
2678
2677
PyOpAttributeMap (PyOperationRef operation)
2679
2678
: operation(std::move(operation)) {}
2680
2679
2681
- nb::typed<nb::object, PyAttribute>
2682
- dunderGetItemNamed (const std::string &name) {
2680
+ nb::object dunderGetItemNamed (const std::string &name) {
2683
2681
MlirAttribute attr = mlirOperationGetAttributeByName (operation->get (),
2684
2682
toMlirStringRef (name));
2685
2683
if (mlirAttributeIsNull (attr)) {
0 commit comments