[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
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "PythonTestCAPI.h"
|
||||
#include "PythonTestDialect.h"
|
||||
#include "mlir-c/BuiltinTypes.h"
|
||||
#include "mlir/CAPI/Registration.h"
|
||||
#include "mlir/CAPI/Wrap.h"
|
||||
|
||||
@@ -29,3 +30,7 @@ bool mlirTypeIsAPythonTestTestType(MlirType type) {
|
||||
MlirType mlirPythonTestTestTypeGet(MlirContext context) {
|
||||
return wrap(python_test::TestTypeType::get(unwrap(context)));
|
||||
}
|
||||
|
||||
bool mlirTypeIsAPythonTestTestTensorValue(MlirValue value) {
|
||||
return mlirTypeIsATensor(wrap(unwrap(value).getType()));
|
||||
}
|
||||
Reference in new issue
Block a user