diff options
author | Jacques Pienaar <jpienaar@google.com> | 2023-07-23 21:26:52 -0700 |
---|---|---|
committer | Jacques Pienaar <jpienaar@google.com> | 2023-07-23 21:26:52 -0700 |
commit | f573bc24d4ea61d68ea61e49eeefbb9a84fa4f34 (patch) | |
tree | 47699c7a8cfbfda51be7e004cae8c6b0a3df246a /mlir/lib/Bindings/Python/IRModule.h | |
parent | c48ed93cf8c9db04ce72acf669dce396cc68672a (diff) | |
download | llvm-f573bc24d4ea61d68ea61e49eeefbb9a84fa4f34.zip llvm-f573bc24d4ea61d68ea61e49eeefbb9a84fa4f34.tar.gz llvm-f573bc24d4ea61d68ea61e49eeefbb9a84fa4f34.tar.bz2 |
[mlir][py] Reuse more of CAPI build time inference.
This reduces code generated for type inference and instead reuses
facilities CAPI side that performed same role.
Differential Revision: https://reviews.llvm.org/D156041t
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.h')
-rw-r--r-- | mlir/lib/Bindings/Python/IRModule.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h index 5da1d7d..d191173 100644 --- a/mlir/lib/Bindings/Python/IRModule.h +++ b/mlir/lib/Bindings/Python/IRModule.h @@ -655,7 +655,8 @@ public: std::optional<std::vector<PyValue *>> operands, std::optional<pybind11::dict> attributes, std::optional<std::vector<PyBlock *>> successors, int regions, - DefaultingPyLocation location, const pybind11::object &ip); + DefaultingPyLocation location, const pybind11::object &ip, + bool inferType); /// Creates an OpView suitable for this operation. pybind11::object createOpView(); @@ -704,13 +705,12 @@ public: pybind11::object getOperationObject() { return operationObject; } - static pybind11::object - buildGeneric(const pybind11::object &cls, pybind11::list resultTypeList, - pybind11::list operandList, - std::optional<pybind11::dict> attributes, - std::optional<std::vector<PyBlock *>> successors, - std::optional<int> regions, DefaultingPyLocation location, - const pybind11::object &maybeIp); + static pybind11::object buildGeneric( + const pybind11::object &cls, std::optional<pybind11::list> resultTypeList, + pybind11::list operandList, std::optional<pybind11::dict> attributes, + std::optional<std::vector<PyBlock *>> successors, + std::optional<int> regions, DefaultingPyLocation location, + const pybind11::object &maybeIp); /// Construct an instance of a class deriving from OpView, bypassing its /// `__init__` method. The derived class will typically define a constructor |