tkonolige opened a new pull request #7330:
URL: https://github.com/apache/tvm/pull/7330


   This PR fixes error messages that arise when a runtime array does not have 
the correct element types for a function. For example:
   ```
   # before
   Check failed: ObjectTypeChecker<TObjectRef>::Check(ptr) == false: Expect 
Array[Operation] but get Array
   # after
   Check failed: ObjectTypeChecker<TObjectRef>::Check(ptr) == false: Expect 
Array[Operation] but get Array[index 0: Tensor]
   ```
   
   Note that because runtime `Array`s are not homogenous, specific elements can 
fail the type checking. I've added which element fails to the errors message 
along with its type. This can also happen for `Map`s, but I could not figure 
out a good way to print which element mismatches (because the elements are 
unordered and I worry printing the key may take too much space).
   
   This is a replacement for #7309 that returns the mismatched type when a 
runtime object cannot be converted.
   
   @jroesch @tqchen @junrushao1994 @rkimball


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