From 34d8221ffedb3e4a3cc3b8ff6c7a86e671e268f3 Mon Sep 17 00:00:00 2001 From: Chris Sullivan Date: Mon, 25 Oct 2021 17:02:01 -0700 Subject: [PATCH] Sync with upstream and use CreateDSOLibraryObject. --- src/runtime/hexagon/hexagon/hexagon_common.h | 2 ++ src/runtime/hexagon/hexagon/hexagon_module.cc | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/hexagon/hexagon/hexagon_common.h b/src/runtime/hexagon/hexagon/hexagon_common.h index a84ea4e20245..87d36c9865e8 100644 --- a/src/runtime/hexagon/hexagon/hexagon_common.h +++ b/src/runtime/hexagon/hexagon/hexagon_common.h @@ -25,6 +25,8 @@ #include #include +#include +#include #if defined(__hexagon__) #include diff --git a/src/runtime/hexagon/hexagon/hexagon_module.cc b/src/runtime/hexagon/hexagon/hexagon_module.cc index 5fc6d71e00c9..a4919ce874e2 100644 --- a/src/runtime/hexagon/hexagon/hexagon_module.cc +++ b/src/runtime/hexagon/hexagon/hexagon_module.cc @@ -31,7 +31,7 @@ #include #include -#include "../../dso_library.h" +#include "../../library_module.h" #include "hexagon_buffer.h" #include "hexagon_common.h" @@ -44,14 +44,12 @@ Module HexagonModuleCreate(std::string data, std::string fmt, const std::set& packed_c_abi) { CHECK(fmt == "so") << "Invalid format provided when constructing Hexagon runtime module: " << fmt << ". Valid formats are: 'so'."; - auto n = make_object(); - n->Init(data); + ObjectPtr n = CreateDSOLibraryObject(data); return CreateModuleFromLibrary(n, hexagon::WrapPackedFunc); } TVM_REGISTER_GLOBAL("runtime.module.loadfile_hexagon").set_body([](TVMArgs args, TVMRetValue* rv) { - auto n = make_object(); - n->Init(args[0]); + ObjectPtr n = CreateDSOLibraryObject(args[0]); *rv = CreateModuleFromLibrary(n, hexagon::WrapPackedFunc); }); } // namespace runtime