Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/runtime/hexagon/hexagon/hexagon_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#include <dlpack/dlpack.h>
#include <tvm/runtime/c_backend_api.h>
#include <tvm/runtime/object.h>
#include <tvm/runtime/packed_func.h>

#if defined(__hexagon__)
#include <HAP_farf.h>
Expand Down
8 changes: 3 additions & 5 deletions src/runtime/hexagon/hexagon/hexagon_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <utility>
#include <vector>

#include "../../dso_library.h"
#include "../../library_module.h"
#include "hexagon_buffer.h"
#include "hexagon_common.h"

Expand All @@ -44,14 +44,12 @@ Module HexagonModuleCreate(std::string data, std::string fmt,
const std::set<std::string>& packed_c_abi) {
CHECK(fmt == "so") << "Invalid format provided when constructing Hexagon runtime module: " << fmt
<< ". Valid formats are: 'so'.";
auto n = make_object<DSOLibrary>();
n->Init(data);
ObjectPtr<Library> 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<DSOLibrary>();
n->Init(args[0]);
ObjectPtr<Library> n = CreateDSOLibraryObject(args[0]);
*rv = CreateModuleFromLibrary(n, hexagon::WrapPackedFunc);
});
} // namespace runtime
Expand Down