diff --git a/base/registry/op_impl_registry_holder_manager.cc b/base/registry/op_impl_registry_holder_manager.cc index e03f192a23fc50e1a00a3c9a8a65d4642f36d958..78a9c1eb1ec00959064562f073d2a48b859898a1 100644 --- a/base/registry/op_impl_registry_holder_manager.cc +++ b/base/registry/op_impl_registry_holder_manager.cc @@ -392,6 +392,9 @@ OpImplRegistryHolderManager::~OpImplRegistryHolderManager() { * 此处临时地显示地指定这些自注册机制的static变量的析构时机(operator_infer_axis_type_info_funcs等static变量,默认在进程退出前析构), * 显示地指定其在so句柄关闭之前进行析构。 * */ - ge::OperatorFactoryImpl::ReleaseRegInfo(); + void (*func)() = (void (*)()) mmDlsym(nullptr, "ReleaseOpsRegInfo"); + if (func != nullptr) { + func(); + } } } // namespace gert diff --git a/tests/depends/platform/src/platform_stub.cc b/tests/depends/platform/src/platform_stub.cc index 1c84e90fea611240b87d81b6171e548606131e92..86edd4eb88394180df04a5ed16f93021c1514046 100644 --- a/tests/depends/platform/src/platform_stub.cc +++ b/tests/depends/platform/src/platform_stub.cc @@ -9,6 +9,12 @@ #include "platform/platform_info.h" +extern "C" { +void ReleaseOpsRegInfo(); +} + +void ReleaseOpsRegInfo() {} + fe::PlatformInfoManager& fe::PlatformInfoManager::Instance() { static fe::PlatformInfoManager pf; return pf;