jroesch commented on a change in pull request #7746:
URL: https://github.com/apache/tvm/pull/7746#discussion_r602630766



##########
File path: src/runtime/library_module.cc
##########
@@ -106,16 +106,16 @@ Module LoadModuleFromBinary(const std::string& type_key, 
dmlc::Stream* stream) {
   if (f == nullptr) {
     std::string loaders = "";
     for (auto name : Registry::ListNames()) {
-      if (name.rfind(loadkey, 0) == 0) {
+      if (name.find(loadkey, 0) == 0) {
         if (loaders.size() > 0) {
           loaders += ", ";
         }
         loaders += name.substr(loadkey.size());
       }
     }
-    ICHECK(f != nullptr) << "Binary was created using " << type_key
-                         << " but a loader of that name is not registered. 
Available loaders are "
-                         << loaders << ". Perhaps you need to recompile with 
this runtime enabled.";
+    LOG(FATAL) << "Binary was created using " << type_key

Review comment:
       Because `if (cond) { }; CHECK(!cond) << msg;` is equivalent to `if 
(cond) else { CHECK(false) << msg }` which also is equivalent to `if (cond) { } 
LOG(FATAL) << msg`




-- 
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]


Reply via email to