This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new b893774  Improve the error message in module.cc (#8694)
b893774 is described below

commit b893774f38c648536645c3ac5775428b3e9d25b0
Author: Jared Roesch <[email protected]>
AuthorDate: Mon Aug 9 21:42:24 2021 -0700

    Improve the error message in module.cc (#8694)
---
 src/runtime/module.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/runtime/module.cc b/src/runtime/module.cc
index cff6545..f9c281a 100644
--- a/src/runtime/module.cc
+++ b/src/runtime/module.cc
@@ -84,7 +84,10 @@ Module Module::LoadFromFile(const std::string& file_name, 
const std::string& for
   }
   std::string load_f_name = "runtime.module.loadfile_" + fmt;
   const PackedFunc* f = Registry::Get(load_f_name);
-  ICHECK(f != nullptr) << "Loader of " << format << "(" << load_f_name << ") 
is not presented.";
+  ICHECK(f != nullptr) << "Loader for `." << format << "` files is not 
registered,"
+                       << " resolved to (" << load_f_name << ") in the global 
registry."
+                       << "Ensure that you have loaded the correct runtime 
code, and"
+                       << "that you are on the correct hardware architecture.";
   Module m = (*f)(file_name, format);
   return m;
 }

Reply via email to