You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/12/24 19:58:11 UTC

[GitHub] [tvm] areusch commented on a change in pull request #7152: [RUNTIME] Improve error messages for TypedPackedFunc

areusch commented on a change in pull request #7152:
URL: https://github.com/apache/tvm/pull/7152#discussion_r548741004



##########
File path: include/tvm/runtime/packed_func.h
##########
@@ -559,7 +569,18 @@ class TVMMovableArgValue_ : public TVMPODValue_ {
 
  private:
   /*! \return The arg value repr of the value. */
-  TVMArgValue AsArgValue() const { return TVMArgValue(value_, type_code_); }
+  TVMArgValue AsArgValue() const { return TVMArgValue(value_, type_code_, prefix_message_); }
+  /*! \brief Construct a message to provide context to any conversion errors in TVMPODValue_. */
+  static std::string error_string(const std::string& name, int argnum) {
+    if (name.size() == 0) {
+      return "";
+    }
+    std::string s = name + ": ";

Review comment:
       perhaps should add something here to indicate that `name` is a function?
   
   `std::string s = std::string{"in calling function "} + s + ": ";`




----------------------------------------------------------------
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:
users@infra.apache.org