aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bindings/Python/IRModule.h
diff options
context:
space:
mode:
authorAdam Paszke <apaszke@google.com>2023-07-12 22:11:14 -0700
committerJacques Pienaar <jpienaar@google.com>2023-07-12 22:27:01 -0700
commitc83318e3e07c40dae7cf28839be3fe62ebcde369 (patch)
tree5a388ffd6735826ffcaf6f57cfe394d9b3ffc496 /mlir/lib/Bindings/Python/IRModule.h
parent86bc2e3ae905f0668f12c6f52191c1273936da80 (diff)
downloadllvm-c83318e3e07c40dae7cf28839be3fe62ebcde369.zip
llvm-c83318e3e07c40dae7cf28839be3fe62ebcde369.tar.gz
llvm-c83318e3e07c40dae7cf28839be3fe62ebcde369.tar.bz2
[MLIR][Python] Implement pybind adapters for MlirBlock
Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D155092
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.h')
-rw-r--r--mlir/lib/Bindings/Python/IRModule.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h
index 76acfe5..5da1d7d 100644
--- a/mlir/lib/Bindings/Python/IRModule.h
+++ b/mlir/lib/Bindings/Python/IRModule.h
@@ -763,6 +763,9 @@ public:
void checkValid() { return parentOperation->checkValid(); }
+ /// Gets a capsule wrapping the void* within the MlirBlock.
+ pybind11::object getCapsule();
+
private:
PyOperationRef parentOperation;
MlirBlock block;