junrushao1994 commented on a change in pull request #7330:
URL: https://github.com/apache/tvm/pull/7330#discussion_r563334497
##########
File path: include/tvm/node/container.h
##########
@@ -1449,31 +1449,41 @@ namespace runtime {
// Additional overloads for PackedFunc checking.
template <typename T>
struct ObjectTypeChecker<Array<T>> {
- static bool Check(const Object* ptr) {
- if (ptr == nullptr) return true;
- if (!ptr->IsInstance<ArrayNode>()) return false;
+ static Optional<String> Mismatch(const Object* ptr) {
+ if (ptr == nullptr) return Optional<String>();
+ if (!ptr->IsInstance<ArrayNode>()) return
Optional<String>(ptr->GetTypeKey());
Review comment:
```suggestion
if (!ptr->IsInstance<ArrayNode>()) return String(ptr->GetTypeKey());
```
----------------------------------------------------------------
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]