[Mlir-commits] [mlir] [mlir][python] make loading dialect module (for type and value casting) best effort only (PR #72338)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 14 22:32:28 PST 2023
================
@@ -132,10 +132,8 @@ PyGlobals::lookupAttributeBuilder(const std::string &attributeKind) {
std::optional<py::function> PyGlobals::lookupTypeCaster(MlirTypeID mlirTypeID,
MlirDialect dialect) {
- // Make sure dialect module is loaded.
- if (!loadDialectModule(unwrap(mlirDialectGetNamespace(dialect))))
- return std::nullopt;
-
+ // Try to load dialect module.
+ (void)loadDialectModule(unwrap(mlirDialectGetNamespace(dialect)));
----------------
rkayaith wrote:
I can't really think of a nice way to test this, so can you at least leave a comment here about why we continue on instead of returning.
https://github.com/llvm/llvm-project/pull/72338
More information about the Mlir-commits
mailing list