jroesch commented on a change in pull request #7746:
URL: https://github.com/apache/tvm/pull/7746#discussion_r602618588
##########
File path: src/runtime/vm/executable.cc
##########
@@ -476,8 +484,19 @@ void LoadHeader(dmlc::Stream* strm) {
}
runtime::Module Executable::Load(const std::string& code, const
runtime::Module lib) {
+ std::cout << "code: " << code.size() << std::endl;
auto exec = make_object<Executable>();
- exec->lib = lib;
+
+ // Support null-initialization of lib, to enable initialization during
+ // deserialization before we have we have deserialized the imports.
+ if (lib.defined()) {
+ ICHECK_EQ(exec->imports_.size(), 0)
Review comment:
It shouldn't but I'm a defensive programmer and paranoid about people
wrongfactoring the code later in a way that breaks an invariant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]