[MLIR][python bindings] implement PyValue subclassing to enable operator overloading
Differential Revision: https://reviews.llvm.org/D147758
This commit is contained in:
1 parent
bfa02523b2
commit
69cc3cfb21
7 files changed
+96
-1
No files matched your search
@@ -40,4 +40,7 @@ PYBIND11_MODULE(_mlirPythonTest, m) {
|
||||
return cls(mlirPythonTestTestTypeGet(ctx));
|
||||
},
|
||||
py::arg("cls"), py::arg("context") = py::none());
|
||||
mlir_value_subclass(m, "TestTensorValue",
|
||||
mlirTypeIsAPythonTestTestTensorValue)
|
||||
.def("is_null", [](MlirValue &self) { return mlirValueIsNull(self); });
|
||||
}
|
||||
Reference in new issue
Block a user