tkonolige commented on a change in pull request #7152:
URL: https://github.com/apache/tvm/pull/7152#discussion_r562750127
##########
File path: include/tvm/runtime/packed_func.h
##########
@@ -1240,16 +1293,19 @@ struct unpack_call_dispatcher<R, 0, index, F> {
template <int index, typename F>
struct unpack_call_dispatcher<void, 0, index, F> {
template <typename... Args>
- TVM_ALWAYS_INLINE static void run(const F& f, const TVMArgs& args_pack,
TVMRetValue* rv,
+ TVM_ALWAYS_INLINE static void run(const std::string* optional_name, const F&
f,
+ const TVMArgs& args_pack, TVMRetValue* rv,
Args&&... unpacked_args) {
f(std::forward<Args>(unpacked_args)...);
}
};
template <typename R, int nargs, typename F>
-TVM_ALWAYS_INLINE void unpack_call(const F& f, const TVMArgs& args,
TVMRetValue* rv) {
- ICHECK_EQ(nargs, args.size()) << "Expect " << nargs << " arguments but get "
<< args.size();
- unpack_call_dispatcher<R, nargs, 0, F>::run(f, args, rv);
+TVM_ALWAYS_INLINE void unpack_call(const std::string* optional_name, const F&
f,
+ const TVMArgs& args, TVMRetValue* rv) {
+ CHECK_EQ(nargs, args.size()) << (optional_name == nullptr ? "<anonymous>" :
*optional_name)
Review comment:
Good point Andrew. I've changed the messages so they are all "Function
\<anonymous\> expects....".
----------------------------------------------------------------
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]