tqchen commented on code in PR #663:
URL: https://github.com/apache/tvm-ffi/pull/663#discussion_r3576227354


##########
python/tvm_ffi/cython/function.pxi:
##########
@@ -398,8 +398,10 @@ cdef int TVMFFIPyArgSetterDType_(
 ) except -1:
     """Setter for dtype"""
     cdef object arg = <object>py_arg
-    # dtype is a subclass of str, so this check occur before str
-    arg = arg._tvm_ffi_dtype
+    # tvm_ffi.dtype is a subclass of str, so this check occurs before str.
+    # The internal DataType helper can also be produced by TypeSchema 
converters.
+    if not isinstance(arg, DataType):

Review Comment:
   more efficient way hre is to allow a separate setter for CDataType, so not 
paying isinstance cost here



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to