Hi everyone, I wonder if anyone knows is it possible to load a module from binary bytes?
For example, current we can
fmod = tvm::runtime::Module::LoadFromFile(module_lib_path);
But there are use cases that it is not possible to load from file, in case we need to load from bytes, from example:
fmod = tvm::runtime::Module::LoadFromBinary(char* model_lib_bytes, size_t bytes_size);
I can see there is an
tvm::runtime::LoadModuleFromBinary, so I tried the following:
const std::string& type_key = "GraphExecutorFactory"; std::unique_ptr<dmlc::Stream> module_stream(dmlc::Stream::Create(module_lib_path.c_str(), "r")); m_fmod = tvm::runtime::LoadModuleFromBinary(type_key, module_stream);
However, it doesn’t work.
Anyone has any idea how we can achieve it?
Thanks in advance!