Lunderberg commented on PR #13539:
URL: https://github.com/apache/tvm/pull/13539#issuecomment-1335715433

   @tqchen Absolutely agreed, user-friendliness and consistency with other APIs 
should not be broken.  The primary goal was to see whether the developer 
experience for internal APIs could be improved without sacrificing the end-user 
experience.  Being able to pass strings as arguments that expect a `DataType` 
is useful functionality that I wouldn't want to remove.  However, passing a 
`DataType` as an argument and receiving a `str` result is less useful, 
especially when it results in many duplicated instances of ad-hoc parsing of 
the string.
   
   Regarding numpy specifically, the updated `tvm.DataType` would be usable in 
any numpy API.  Numpy supports custom objects as dtypes by checking for a 
`arg.dtype` attribute.  By implementing this attribute 
[here](https://github.com/apache/tvm/pull/13539/files#diff-1a640415b179ec94fe877eef5ebb47935b21ec3780a91ac5184200e6104e7180R240),
 the compatibility is maintained.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to