jroesch commented on a change in pull request #7746:
URL: https://github.com/apache/tvm/pull/7746#discussion_r602618450
##########
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()) {
Review comment:
The problem is in this case we actually need to check the argument,
arguably it should be like Optional<runtime::Module> but since Module is
nullable you have to check for inner nullability either way. I don't think that
would clean up this use site, I made the change in GetLib and will make that
and SetLib preferred interface at least until we figure out aritfact situation.
--
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]